A = [
91954 81625 386577 38704 27989 27045 28029 27759 30696 37183 70747 108683 132111 165320 207172 232530 243869 253315 250490 242830 230784 219432 212393 210056 210956 203879 194605 179683 153909 118296 109521 92735 50480 44526 37227 33894 30390 25615 24550 22901 21510 20471 19306 17993 16576 15060 13859 13851 12884 11141 10647 10936 11202 11479 11401 11972 12109 12481 12922 13053 13396 13647 14430 14771 15098 15665 15989 16604 16926 17432 17768 18310 18875 19410 19944 20190 20814 21356 21914 22455 22673 23103 23567 24238 24053 24951 25308 25931 25802 26166 26876 27021 27257 27519 27851 27856 28343 28809 28962 29148 29002 29265 28927 29527 29519 29506 30020 29908 29802 30165 29746 29801 29779 29482 29403 29420 29668 29283 29555 29286 29344 29408 28840 28875 28376 28047 28236 27938 27662 27833 27377 27222 26925 26459 26298 25699 25946 25473 25200 25522 25340 24899 24667 24159 24087 23670 23315 23219 23127 23109 22540 22486 21843 21631 21346 21279 20891 20897 20685 20016 20173 19609 19546 19480 18890 18480 18581 18555 17960 17908 17788 17409 17415 17155 16755 16725 16255 15919 15634 15338 15323 15219 15042 14722 14373 14198 13895 13788 13596 13272 13077 12852 12620 12663 12388 12182 12117 11761 11620 11292 11451 10944 10933 10750 10500 10327 10276 9914 9627 9569 9658 9522 9151 9043 8866 8675 8570 8496 8251 8145 8144 7896 7841 7600 7552 7370 7249 7181 6920 6971 6630 6544 6561 6456 6393 6108 6275 6066 5924 5846 5732 5615 5420 5370 5119 5238 4985 5102 4740 4755 4827 4583 4429 4468 4381 4286 4189 4128 4018 3981 3967 3687 3768 3654 3499 3464 3365 3389 3304 3319 3011 3062 3035 2879 2813 2851 2797 2797 2680 2597 2552 2522 2426 2471 2263 2342 2264 2155 2099 2002 2090 1906 1935 1982 1866 1894 1850 1733 1684 1663 1612 1605 1569 1556 1497 1443 1419 1440 1357 1380 1265 1227 1178 1180 1159 1119 1072 1069 1083 1003 1016 933 932 943 945 909 885 875 929 804 809 817 798 741 734 750 710 755 674 683 635 669 618 629 593 587 550 526 515 502 442 536 465 475 411 444 415 411 394 366 363 415 376 356 318 326 313 308 346 288 316 278 295 274 311 276 285 245 241 257 233 240 234 229 201 199 208 187 174 229 189 178 203 199 170 196 163 180 192 218 168 168 179 144 163 148 139 105 130 160 125 125 119 127 120 111 134 125 106 130 95 111 109 109 113 95 122 134 114 137 104 135 91 106 105 113 111 112 88 99 99 86 93 93 119 83 95 89 77 112 96 86 70 87 98 79 84 88 75 81 67 50 87 76 78 83 85 64 72 60 72 85 69 54 66 67 82 52 65 42 50 68 65 56 68 68 54 62 73 70 69 81 74 60 55 83 86 88 62 57 57 52 61 53 54 32 46 52 58 41 48 53 36 44 40 50 41 41 44 51 53 65 42 51 45 34 50 42 43 48 42 40 42 55 40 38 43 43 54 35 43 49 51 61 47 42 43 57 55 42 58 51 33 44 58 41 63 44 40 48 42 44 46 34 47 39 40 48 37 45 44 34 35 37 34 44 45 48 41 51 38 36 48 46 51 42 54 42 39 28 36 40 33 37 34 35 36 50 35 80 53 41 33 33 37 42 46 42 46 48 42 36 37 35 36 40 45 24 33 53 39 42 40 39 37 32 50 37 55 40 42 28 37 38 52 40 29 39 36 28 46 34 36 23 32 26 20 36 35 34 24 46 39 27 35 25 36 34 52 38 37 26 46 37 35 48 22 34 41 23 23 32 36 30 28 24 31 30 41 42 36 22 28 18 25 23 27 23 39 21 35 37 35 39 27 33 31 37 37 30 29 41 39 31 34 36 30 20 33 19 25 13 26 22 20 24 21 26 20 20 28 29 35 48 44 40 55 39 34 50 34 38 44 33 42 41 43 39 37 43 38 33 33 38 39 28 25 42 29 20 30 36 34 25 15 14 28 30 37 29 27 22 34 23 34 47 25 42 33 32 28 43 45 39 32 30 20 33 32 21 15 38 24 26 25 29 19 23 30 22 24 53 13 26 23 59 19 20 12 21 21 19 24 25 29 23 19 22 22 15 21 20 20 21 18 24 15 15 15 9 19 19 19 21 13 14 14 15 13 15 15 16 14 12 22 13 14 14 18 16 13 21 18 27 19 18 18 26 19 15 21 16 19 24 9 23 10 18 18 14 22 10 16 16 17 14 14 25 15 9 24 16 20 19 17 15 15 24 17 7 42 5 11 10 15 9 16 19 14 18 15 16 16 15 15 14 20 16 19 18 17 18 11 16 6 6 10 13 14 18 18 11 14 13 18 12 15 13 15 14 26 17 19 6 24 14 5 16 18 10 9 9 12 8 12 13 7 8 8 10 7 11 13 22 16 9 15 7 9 18 16 23 15 17 26 10 19 21 18 16 15 24 21 24 14 12 11 14 7 7 19 15 14 9 13 6 9 9 9 15 11 10 9 8 9 18 13 13 16 19 14 10 15 6 13 9 11 4 7 14 16 14 15 18 17 15 8 21 22 19 18 17 22 14 17 13 18 17 21 12 11 9 21 21 19 9 16 9 16 17 7 10 8 10 12 17 14 8 10 13 16 9 8 6 6 4 14 9 4 12 8 7 5 10 8 8 6 14 7 4 12 10 14 6 7 12 1 6 10 7 14 5 12 7 8 9 10 5 10 12 9 13 10 6 14 14 10 6 11 10 13 10 9 10 11 10 10 13 9 5 6 12 11 10 8 10 7 8 11 9 10 13 10 11 8 4 6 11 10 3 4 13 8 7 8 6 4 9 11 6 4 9 3 7 5 4 5 6 9 4 8 3 9 5 4 4 3 9 6 8 3 5 5 4 7 4 8 4 4 4 2 5 5 4 4 6 7 3 2 8 5 2 8 10 7 6 14 9 10 6 6 10 12 2 11 8 11 10 6 9 12 5 3 8 1 3 6 4 3 3 2 6 5 3 8 6 5 1 2 4 1 5 3 4 4 6 2 3 2 5 9 5 8 3 7 6 2 5 2 2 7 5 5 4 3 7 4 17 7 7 13 15 12 11 8 6 6 6 3 5 6 7 10 7 2 7 3 6 0 1 3 3 5 2 6 5 4 4 10 5 9 11 3 7 3 3 0 8 3 4 4 2 6 2 2 1 6 5 3 1 2 7 5 2 5 5 4 12 4 4 8 3 2 3 7 2 3 1 5 3 1 2 2 0 4 5 5 2 3 8 4 4 3 9 3 3 3 2 5 4 9 3 3 5 7 3 3 3 9 7 6 2 0 2 2 5 2 0 5 2 2 3 1 2 1 3 5 0 4 3 2 5 2 3 2 4 11 6 8 5 7 9 3 3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 0 0 1 0 1 0 1 1 0 0 0 1 0 0 0 0 0 0 1 0 1 1 0 0 1 1 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 3 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 4 0 0 2 1 1 1 2 2 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 1 1 1 4 0 2 0 1 0 1 0 1 1 3 2 
];
B = [
0 0 0
 7473 3867 3606
 9311 4794 4517
 11029 6172 4857
 8333 4406 3927
 9219 4902 4317
 11653 6668 4985
 13727 8030 5697
 15803 9033 6770
 20005 12269 7736
 14036 8522 5514
 34724 25649 9075
 10362 7102 3260
 12116 9046 3070
 7925 6016 1909
 4408 3002 1406
 2766 1798 968
 3186 2207 979
 2157 1377 780
 2800 1810 990
 2320 1412 908
 4022 2599 1423
 3794 2323 1471
 4701 3203 1498
 3704 2282 1422
 6431 4414 2017
 5591 3813 1778
 10320 7453 2867
 4625 3682 943
 8860 6962 1898
 5332 4358 974
 4564 3699 865
 5051 4266 785
 5668 4716 952
 4401 3702 699
 5007 4161 846
 4062 3389 673
 3449 2911 538
 5256 4608 648
 4190 3501 689
 4286 3773 513
 5144 4412 732
 4508 3966 542
 7321 6405 916
 6029 5327 702
 4356 3934 422
 4487 3959 528
 7186 6587 599
 5642 4969 673
 8350 7701 649
 4250 3829 421
 4702 4310 392
 8581 7950 631
 4298 3858 440
 10266 9596 670
 5743 5177 566
 8933 8166 767
 7099 6732 367
 6448 5921 527
 12463 11603 860
 4277142 4159436 117706
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 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 4 0 0
3 0 0 0
16 0 5 0
43 0 6 0
54 0 4 0
89 1 5 0
153 1 3 0
48 1 13 0
127 4 35 14
1054 2 27 15
20611 4 36 9
156793 3 31 20
497075 4 35 13
891272 15 48 23
1003110 99 32 41
874578 19 38 38
558119 48 50 67
242306 64 71 69
56629 68 88 85
4354 75 115 125
293 123 139 171
551 148 179 153
398 197 235 181
553 260 240 238
450 310 256 255
477 355 325 332
629 486 327 354
654 2794 410 396
855 774 431 440
827 802 543 625
992 936 538 551
1280 1134 591 587
1303 1186 725 637
1045 940 787 780
1358 1157 892 910
1018 1089 1073 905
1337 1203 943 892
1471 1530 1008 1001
1275 1657 1093 1682
2446 2776 1155 1238
1450 1285 1266 1714
1207 1226 2562 1551
1337 1334 1248 1254
1564 2552 1338 1259
1969 1770 1250 1276
2612 2851 1444 1443
2026 2007 1349 1349
1658 1711 1439 1433
1427 1680 1571 1559
1571 1645 1316 1287
1284 1197 1273 1224
1267 1256 1299 1231
1200 1175 1556 1488
1066 1042 1111 1091
1056 1033 1035 1027
975 996 1029 1000
921 1018 1022 1060
982 1083 821 887
735 749 719 773
615 643 599 772
689 893 656 674
338 374 370 395
208 172 204 186
50 53 34 43
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
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 
];
