A = [
85916 68400 7577194 64932 37075 42000 37939 30485 35524 29161 30245 35228 30773 33199 36707 31314 34624 38049 33335 35797 40125 33972 36715 40611 34612 36915 40513 34424 37392 39415 34616 36391 38590 33471 35655 38223 32373 34055 36982 31633 33392 35611 30837 32740 36049 30019 33352 35026 29202 31190 34426 29249 30626 33523 28946 30603 32490 28909 29854 33019 27820 28949 32078 27411 28527 31177 27323 27935 31949 26783 27570 30685 26485 28137 29969 25918 27335 29846 25659 27033 30157 25934 26696 28886 24893 26362 28400 25016 26193 28573 24191 25717 27533 24521 25082 27595 24442 25295 27083 23705 24551 26536 23298 23986 26294 22807 23857 26813 22480 23486 25373 22145 23016 24567 21835 22362 24581 21270 22702 23768 20960 21755 23731 20346 21688 23221 20429 20994 22660 19589 20537 22273 19006 19873 21847 18776 19479 20671 18447 19353 21273 17867 18827 19905 17718 18186 19293 17492 17740 18823 16679 17167 18563 15791 17117 17702 15670 16324 17129 15232 15565 16704 14658 15419 16393 14509 14914 15751 14039 14351 14984 13329 13575 14794 12951 13234 14269 12642 13187 13907 12008 12223 13245 11711 11957 12726 11125 11645 12274 10603 10968 11965 10597 10707 11359 10104 10676 11027 9580 10016 10639 9356 9755 10316 9059 9243 9858 8608 8965 9726 8251 8542 9426 8128 8536 9017 7639 8149 8792 7589 8016 8313 7115 7429 7890 6892 7400 7632 6620 6797 7362 6260 6725 7087 6330 6427 6887 5994 6218 6481 5685 5905 6133 5431 5604 6166 5037 5530 5782 5024 5118 5636 4829 5038 5226 4493 4813 5101 4379 4707 5003 4170 4520 4566 4020 4247 4470 3926 3906 4339 3624 3864 4015 3557 3632 3846 3463 3495 3724 3202 3355 3761 2998 3336 3403 2963 3127 3250 2802 2876 3039 2814 2821 2873 2611 2587 2702 2447 2510 2697 2393 2410 2573 2432 2423 2430 2106 2183 2360 2065 2093 2291 1999 1958 2138 1958 1918 1946 1797 1796 1959 1654 1747 1803 1578 1700 1790 1535 1654 1654 1454 1544 1633 1367 1480 1529 1337 1417 1404 1273 1273 1391 1174 1204 1290 1095 1160 1271 1038 1040 1237 1021 1018 1171 998 1004 1027 967 906 1015 867 967 955 822 835 939 768 724 902 735 794 833 762 768 726 676 689 755 688 623 690 682 710 700 635 666 672 567 541 593 516 532 592 517 568 587 511 538 519 472 529 487 482 476 476 400 372 459 403 429 442 406 439 415 353 386 421 312 343 352 323 319 346 297 307 335 270 362 303 251 288 271 258 235 295 261 286 250 238 263 258 207 196 222 213 250 206 194 201 233 177 207 196 142 182 192 163 160 196 154 176 148 153 149 177 153 137 164 135 144 161 146 119 129 107 133 125 140 100 117 107 120 118 120 103 120 91 101 99 81 109 115 78 81 106 82 74 97 78 84 90 78 82 82 53 74 74 67 68 79 72 58 58 75 61 64 45 54 65 49 42 48 43 53 63 39 42 63 51 44 52 60 38 61 30 45 39 31 36 39 32 41 37 39 35 33 35 38 41 32 26 54 26 30 35 38 26 30 33 27 30 28 29 23 15 32 26 19 36 26 24 17 33 18 20 25 10 19 18 20 20 23 13 14 18 14 17 16 13 19 17 17 9 18 11 14 8 18 16 11 13 10 16 15 6 17 9 12 12 15 4 11 9 13 38 7 10 8 7 16 13 13 7 4 5 7 41 9 5 11 11 11 8 11 13 7 6 7 13 0 7 12 2 9 8 11 7 8 6 4 6 9 6 7 12 9 7 7 8 8 8 6 12 8 4 4 7 3 3 8 6 6 4 4 3 5 4 5 3 5 3 3 0 3 5 4 4 3 2 6 1 0 4 4 1 3 5 1 5 2 0 6 3 1 3 2 2 5 2 1 3 7 2 4 6 0 1 2 5 1 1 1 1 3 5 1 2 1 2 3 1 2 3 3 1 3 1 1 4 4 4 2 3 0 2 2 2 0 10 6 1 0 1 2 2 6 3 2 1 0 0 4 2 1 69 1 2 1 4 2 0 2 2 2 1 4 1 2 1 1 1 1 1 0 0 0 0 1 2 4 1 1 3 1 4 1 0 0 2 1 3 1 1 2 1 0 2 3 0 3 1 5 1 2 1 0 0 3 1 3 2 3 1 0 0 2 0 1 3 1 0 0 3 1 3 2 3 0 0 1 1 0 0 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0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
];
B = [
0 0 0
 12683 10706 1977
 5189 4860 329
 31743 30046 1697
 4819 4228 591
 4136 3762 374
 9349 8850 499
 12209 11617 592
 6937 6538 399
 30402 29050 1352
 8625 8283 342
 6817 6084 733
 7167 6901 266
 12414 11460 954
 4302 3985 317
 38008 36669 1339
 5944 5728 216
 6562 6398 164
 6908 6651 257
 14611 13902 709
 12061 11462 599
 41374 39370 2004
 13842 13154 688
 11333 10833 500
 23970 22848 1122
 45293 44062 1231
 2173 2090 83
 188326 181553 6773
 2193 2157 36
 4115 3995 120
 4791 4616 175
 10305 10172 133
 1419 1364 55
 48170 47475 695
 1869 1844 25
 4177 4121 56
 4083 3918 165
 8249 7722 527
 269 260 9
 55314 53907 1407
 2 2 0
 25 24 1
 643 631 12
 8375 8257 118
 666 650 16
 481 473 8
 447 422 25
 1473 1404 69
 87774 86357 1417
 7 6 1
 962 944 18
 651 637 14
 514 504 10
 2902 2854 48
 108146 106612 1534
 1938 1930 8
 2349 2343 6
 977 973 4
 18034 17679 355
 33389 32908 481
 9383703 9324225 59478
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 
];
D = [
2 15 0 0
6 0 0 0
1 7 0 0
0 8 0 0
0 4 0 1
1 11 3 0
26 5 21 5
150 58 26 33
1477 19 58 49
12644 8 91 75
40386 74 113 82
116880 35 124 146
323277 112 189 172
748582 87 164 119
1422160 67 158 168
1889772 71 211 153
1928392 129 161 148
1712533 88 206 122
1192631 133 223 149
590402 155 166 239
199422 152 211 219
39617 328 184 181
3794 251 210 188
984 351 247 214
1312 335 251 222
1748 444 280 293
1253 339 298 319
1050 421 302 320
401 318 304 349
743 389 271 322
890 363 280 280
615 589 298 302
417 937 284 264
412 393 283 272
272 795 261 246
345 266 276 253
278 249 217 467
254 265 229 211
557 252 215 245
184 250 268 207
210 191 210 245
223 206 190 186
1203 225 202 192
204 181 220 171
236 179 193 224
202 321 196 256
204 203 211 262
192 184 217 194
186 509 213 176
201 193 173 197
236 230 228 198
197 164 181 167
190 181 190 175
163 158 150 219
815 122 135 146
135 120 122 131
195 99 88 80
75 81 83 71
60 66 47 77
43 45 65 63
31 19 40 26
3 8 10 6
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0

];x = [
10 12 15 19 23 28 35 43 53 66 81 100 123 152 187 231 285 351 433 534 658 811 1000 1233 1520 1874 2310 2848 3511 4329 5337 6579 8111 10000 12328 15199 18738 23101 28480 35112 43288 53367 65793 81113 100000 123285 151991 187382 231013 284804 351119 432876 533670 657933 811131 1000000 1232847 1519911 1873817 2310130 2848036 3511192 4328761 5336699 6579332 8111308 10000000 12328467 15199111 18738174 23101297 28480359 35111917 43287613 53366992 65793322 81113083 100000000 123284674 151991108 187381742 231012970 284803587 351119173 432876128 533669923 657933225 811130831 1000000000 1232846739 1519911083 1873817423 2310129700 2848035868 3511191734 4328761281 5336699231 6579332247 8111308308 10000000000 
];
