A = [
67230 76735 2522029 52319 73304 75071 65933 75773 82180 74345 78209 88328 78383 82238 91617 81750 86993 94131 84349 89916 96319 84531 88428 95247 84540 91228 97554 86992 93690 99059 86880 90678 95690 84262 88641 93857 82265 86094 91458 80391 83615 88561 78346 81588 87226 76267 79544 84626 73621 77533 82109 72255 76442 80739 70683 73571 77841 69519 72496 76942 67109 70055 74773 66066 68749 73467 64651 66633 71426 63213 65392 69547 61548 64071 67775 60364 62403 66769 59111 61390 64794 57319 59779 63179 55821 58404 61999 54654 56862 60595 53202 55523 58555 52697 54402 56973 50970 53249 56015 50089 51808 54563 48702 50125 53515 47721 49309 51910 45794 47861 50828 44661 46526 49320 43994 45236 48314 42521 44193 46511 41496 42723 45422 39997 41725 44268 39545 40636 42889 38235 39800 41526 36757 37866 40383 35602 36833 39321 34798 35783 37950 34050 35046 36905 32980 34055 35947 31481 32988 34397 31119 31862 33258 29792 30853 32191 28874 29736 31736 28047 28967 30344 26987 28000 29622 26590 27169 28678 25176 26296 27580 24504 25108 26336 23493 24838 25698 22752 23677 24703 22127 22566 24000 21424 22140 23082 20694 21229 22360 20166 20864 21828 19342 19851 20905 18657 19421 20276 17886 18842 19418 17331 18158 18957 16959 17565 18051 16094 16761 17688 15693 16147 17096 15435 15771 16608 14498 14996 16010 14152 14786 15450 13672 13909 14670 13338 13852 14312 12688 13064 13760 12277 12672 13277 11847 12168 12622 11549 11795 12279 11153 11398 12044 10772 10874 11428 10246 10719 11016 9966 10326 10843 9854 10005 10418 9225 9597 9675 9054 9254 9645 8702 8864 9314 8280 8644 8837 8010 8245 8687 7656 7907 8268 7575 7602 8039 7078 7530 7635 6825 7023 7435 6521 6797 7185 6493 6707 6910 6092 6346 6634 5912 6099 6524 5633 5955 6233 5396 5648 5916 5530 5580 5704 5007 5319 5418 4982 5092 5308 4817 4787 5206 4494 4748 5015 4491 4512 4788 4320 4390 4571 4151 4331 4410 3973 4152 4378 3812 3896 4127 3679 3807 3922 3515 3695 3790 3382 3470 3613 3214 3426 3603 3168 3124 3398 3050 3081 3182 2847 2872 3108 2768 2913 3015 2657 2865 2819 2632 2707 2929 2478 2600 2610 2344 2452 2609 2259 2396 2495 2323 2282 2339 2141 2189 2304 2083 2115 2213 1909 2071 2149 1937 1986 2042 1908 1889 2000 1753 1811 1912 1656 1812 1819 1790 1718 1796 1583 1621 1687 1504 1551 1656 1535 1565 1587 1417 1415 1528 1393 1471 1401 1448 1419 1440 1260 1261 1349 1230 1276 1301 1133 1166 1244 1108 1193 1209 1038 1156 1153 1080 1004 1077 1075 1059 1118 896 1002 994 893 966 1043 859 921 912 862 938 886 830 836 846 758 756 919 767 742 814 725 771 824 719 735 739 667 727 778 702 650 710 653 656 658 601 595 669 588 562 605 587 569 633 524 589 580 508 551 555 478 521 517 507 531 534 451 451 478 452 492 491 398 428 440 410 431 409 397 407 397 362 382 406 399 386 344 328 339 394 307 348 354 352 335 328 319 294 344 299 290 335 282 273 295 270 303 331 264 267 280 231 267 311 233 228 246 244 241 224 210 249 266 232 224 209 209 197 209 221 214 241 218 208 199 176 191 208 187 188 184 184 199 170 179 163 169 150 153 190 124 160 187 147 162 175 136 128 146 151 139 148 146 142 136 113 123 117 121 138 122 125 132 112 92 95 136 124 105 133 98 105 108 106 104 106 92 105 136 89 89 109 89 98 106 92 90 74 87 94 113 76 91 78 76 90 78 71 96 84 97 104 79 75 74 79 65 64 73 66 62 71 69 58 69 65 68 71 63 57 73 48 61 64 49 47 66 67 54 54 51 48 55 51 56 45 60 45 55 46 44 44 48 55 38 43 47 56 45 32 49 40 40 46 57 44 43 49 48 42 40 37 33 32 37 41 33 49 32 34 32 35 32 36 34 39 35 42 39 18 32 23 36 23 16 25 28 29 24 29 24 24 28 26 19 26 27 33 18 37 29 19 27 22 23 24 25 21 22 31 21 31 45 26 25 19 27 33 13 26 21 22 24 16 18 20 19 23 37 13 15 14 19 12 13 16 13 15 15 15 25 21 23 11 17 20 15 22 16 12 13 22 21 20 15 12 14 8 20 18 12 13 17 15 16 25 11 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0 0 0 2 0 0 0 0 1 1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 1 0 1 0 0 0 1 0 0 0 0 0 1 1 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 1 0 1 0 0 0 0 0 0 1 0 0 0 0 1 0 0 0 1 0 0 0 1 0 0 0 0 0 0 0 2 0 0 0 0 0 0 0 2 0 0 0 0 0 0 0 0 0 0 1 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 1 0 0 0 0 
];
B = [
0 0 0
 11392 7477 3915
 5229 3463 1766
 27040 21056 5984
 5456 3356 2100
 4401 2918 1483
 7247 4823 2424
 10923 7806 3117
 6031 4156 1875
 27248 21407 5841
 5704 4003 1701
 5694 4052 1642
 7150 4978 2172
 12924 9469 3455
 4817 3391 1426
 31130 24968 6162
 5974 4429 1545
 6323 4713 1610
 7587 5630 1957
 14797 11468 3329
 9174 6933 2241
 34543 27581 6962
 12657 9657 3000
 10254 7762 2492
 21900 16823 5077
 37711 29454 8257
 3215 2521 694
 154308 124913 29395
 2322 1812 510
 5659 4681 978
 3936 3155 781
 8425 6939 1486
 1904 1511 393
 38403 32584 5819
 2378 1959 419
 7009 6083 926
 4026 3280 746
 8664 6907 1757
 482 372 110
 45474 38286 7188
 11 11 0
 58 46 12
 1440 1249 191
 12073 10787 1286
 1139 991 148
 870 764 106
 798 650 148
 2665 2253 412
 85462 72972 12490
 26 20 6
 1777 1592 185
 1178 1047 131
 1041 862 179
 4345 3759 586
 107147 93146 14001
 2665 2406 259
 2268 2042 226
 827 744 83
 22844 20225 2619
 48995 44499 4496
 7584132 6937940 646192
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 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
1191793 583 1214 1055
1168722 652 1361 1171
979619 855 1432 1354
655745 1028 1617 1551
320409 1220 1808 1799
106834 1553 1934 1928
21667 1797 2178 2060
4579 2210 2354 2283
3707 2361 2679 2519
4091 2742 2876 2888
3648 2787 2964 3059
3768 3026 3145 3184
3475 3189 3270 3309
3509 3299 3321 3304
3887 3418 3411 3385
3630 3417 3415 3457
3454 3361 3296 3259
3366 3184 3142 3172
3200 3137 3090 3169
3125 2963 2869 2861
2810 2844 2826 2823
2755 2703 2674 2655
2775 2621 2606 2576
2542 2515 2602 2445
2436 2379 2356 2422
2402 2440 2381 2358
2594 2399 2344 2379
2403 2332 2370 2305
2504 2366 2406 2406
2423 2426 2374 2374
2469 2394 2475 2489
2381 2354 2372 2437
2335 2590 2524 2384
2362 2466 2431 2337
2368 2339 2456 2270
2294 2289 2271 2133
2142 2083 2152 2084
1924 1937 2055 2024
1943 1695 1755 1786
1589 1504 1542 1599
1353 1379 1303 1315
1102 1201 1160 1065
877 854 843 888
615 671 674 633
367 403 392 383
74 71 88 103
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
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 
];
