A = [
9754 9429 118567 8428 9088 9155 8682 8985 9286 9544 9723 13150 16821 17641 21580 25164 23043 26383 24915 20648 26504 27784 26356 30572 33825 55747 63455 70385 96032 91119 86323 87877 83186 77769 80116 81248 72965 74140 75666 67856 72698 79481 73069 78107 84962 76874 81176 82320 72947 76131 77249 70402 73606 75453 67634 71041 72387 64326 66328 67979 61128 63403 65779 57940 61559 62458 55564 58269 59745 52212 54457 55005 50271 51735 53589 47481 49040 49439 43849 46203 47020 41624 43523 45027 40059 42058 42722 38027 39374 40634 35425 37109 38421 33715 35014 35715 31636 32994 33466 29977 31440 31770 28180 29189 29475 26343 28130 28849 25192 25996 27167 23875 24590 25328 22283 22877 23848 21193 22023 22226 19838 20492 20741 18647 19003 19760 17899 17616 18613 16422 17001 17463 15287 15906 16487 14958 15365 15812 13857 14472 14929 13100 13536 13881 12479 12966 13157 11530 12092 12442 11206 11384 11666 10737 10816 11076 10088 10449 10280 9280 9804 9947 8656 9333 9364 8236 8659 9039 8047 8126 8599 7514 7756 7997 7021 7393 7506 6821 7009 7059 6567 6734 6847 6190 6292 6585 5723 5818 6036 5501 5633 5702 5288 5326 5496 4836 5055 5253 4797 4744 5001 4340 4304 4691 4247 4383 4583 3886 4096 4315 3727 3999 4146 3485 3714 3927 3393 3532 3580 3232 3334 3469 3029 3245 3308 2925 3012 3099 2744 2822 2924 2593 2735 2954 2556 2627 2644 2282 2437 2463 2245 2282 2273 2086 2155 2215 2109 2238 2213 1976 2011 1957 1821 1909 1979 1752 1887 1917 1715 1760 1785 1611 1646 1687 1542 1607 1664 1431 1551 1569 1384 1421 1428 1325 1394 1362 1209 1282 1332 1197 1196 1223 1162 1109 1210 1038 1037 1134 1044 1057 1062 923 1001 977 948 907 895 871 934 882 803 831 851 795 785 810 732 753 792 701 700 780 696 696 720 675 640 637 623 588 619 573 574 614 504 573 584 532 507 532 472 507 492 419 459 476 402 430 461 383 432 430 367 354 417 388 372 399 347 348 372 309 345 343 303 340 354 322 315 319 269 326 313 250 304 331 264 264 278 258 266 265 222 245 265 216 232 218 203 205 243 199 210 209 198 181 205 161 195 189 175 157 185 164 165 163 133 153 164 164 163 148 140 126 153 132 124 148 117 134 133 138 116 131 106 108 122 116 108 124 110 106 118 93 93 90 84 88 95 97 92 92 71 68 93 73 84 72 72 83 73 58 68 62 68 71 69 67 70 79 65 49 60 66 46 55 54 64 63 65 57 75 55 46 54 49 58 63 42 49 53 53 45 51 40 37 42 41 48 41 37 43 31 40 31 30 42 27 30 37 29 32 28 25 33 25 32 30 26 17 24 30 20 25 28 21 27 21 22 22 26 29 30 15 14 27 15 24 23 21 19 12 9 17 22 17 17 21 20 15 15 21 17 31 19 15 14 21 13 15 15 13 13 8 16 16 12 13 10 13 16 6 10 23 10 9 12 13 10 19 11 9 17 12 11 14 7 6 10 7 15 11 3 7 11 6 7 5 6 9 8 18 7 9 7 9 5 9 5 3 9 13 9 9 8 4 8 6 6 9 6 8 14 6 4 9 7 9 8 7 2 9 5 10 4 3 4 6 5 1 2 5 7 5 5 4 6 7 2 9 3 3 6 5 3 3 8 5 5 5 9 6 2 5 5 8 4 6 5 2 4 6 6 1 2 7 5 4 8 3 1 3 5 2 4 0 1 2 8 1 1 1 2 3 4 2 3 9 3 5 5 3 1 5 2 4 3 2 2 4 0 5 3 4 4 4 4 1 4 1 2 3 7 3 3 3 3 3 6 0 0 3 4 0 4 1 2 2 4 1 1 3 1 1 2 4 2 1 0 4 0 3 2 2 1 2 1 3 1 3 1 3 2 2 3 2 2 3 2 2 0 3 3 4 3 3 0 2 2 2 3 0 2 0 4 2 0 1 1 2 1 0 3 1 1 2 2 0 3 4 0 1 1 2 3 1 4 1 2 3 1 2 3 1 2 1 0 0 2 1 3 2 2 1 3 2 2 1 2 0 3 1 2 0 0 1 2 2 3 3 0 1 2 4 3 4 2 1 0 3 1 2 3 2 1 0 2 2 2 1 2 1 2 0 2 2 3 1 1 0 1 0 2 2 1 2 1 0 0 2 3 1 1 2 2 0 0 1 2 0 1 1 1 1 1 0 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0 1 0 0 0 0 1 2 0 0 1 1 0 1 1 0 0 0 3 0 0 0 1 0 0 2 0 1 0 0 0 0 2 1 1 1 0 0 1 0 1 1 0 0 0 1 2 0 0 0 1 0 1 0 0 2 3 0 1 1 0 2 1 0 1 2 0 2 1 2 1 1 2 1 0 0 0 0 1 0 1 0 1 0 0 1 0 0 0 0 1 0 0 0 0 0 0 1 2 0 
];
B = [
0 0 0
 1037 434 603
 1374 549 825
 5528 2044 3484
 2245 998 1247
 1539 749 790
 1666 701 965
 1970 892 1078
 1721 715 1006
 5273 2163 3110
 4143 1879 2264
 5553 2197 3356
 14081 5326 8755
 3613 1476 2137
 3959 1634 2325
 3212 1382 1830
 502 222 280
 1472 582 890
 868 401 467
 809 374 435
 951 374 577
 2269 905 1364
 1334 493 841
 1689 699 990
 1347 501 846
 2540 1196 1344
 2342 942 1400
 12636 4677 7959
 2417 1053 1364
 7427 2962 4465
 2587 1050 1537
 2568 1045 1523
 2857 1214 1643
 3831 1608 2223
 1403 642 761
 2666 1163 1503
 1021 455 566
 1155 562 593
 2099 918 1181
 3908 1775 2133
 1270 623 647
 2561 1113 1448
 1892 841 1051
 1383 578 805
 7725 3074 4651
 1471 668 803
 1414 638 776
 3189 1406 1783
 4384 1845 2539
 3022 1389 1633
 2245 1051 1194
 1506 708 798
 3780 1740 2040
 1735 797 938
 6871 3133 3738
 3776 1597 2179
 2092 960 1132
 2855 1364 1491
 6407 2638 3769
 7358 3660 3698
 3225175 1610496 1614679
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 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
1 0 0 0
1 0 0 0
0 0 0 0
0 0 0 0
0 1 0 0
0 2 0 0
69 3 1 0
1063 0 3 0
1186 11 3 3
51734 17 3 2
63782 50 5 2
70738 149 10 6
75582 504 16 11
70677 1289 23 27
61474 2699 37 34
44258 4907 50 54
25141 7283 104 66
10664 9602 82 102
3335 12126 175 126
1035 13711 182 166
588 13825 223 242
544 11432 225 228
485 12560 223 233
549 10110 284 288
508 9326 364 385
587 7601 456 494
573 5521 453 448
908 4518 556 527
685 3684 651 666
815 3882 817 805
880 3366 887 913
1191 2627 1114 1080
1792 2672 1260 1198
1508 2324 1462 1420
1723 2237 1708 1619
2176 2138 2106 2030
3071 2499 2455 2332
2829 3011 2822 2725
3464 3340 3422 3206
4040 3905 3919 3871
4375 4308 4178 4237
4860 4720 4920 4862
5281 5298 5365 5309
6382 5798 5941 5918
6198 6348 6640 6261
7393 7286 7495 7290
9353 9254 9374 9280
11300 11593 11661 11088
13391 13266 13657 13173
16109 15982 15992 15615
16460 15892 16269 15822
13640 13855 13889 13718
14569 13848 14017 13541
16450 15840 16400 15658
16615 16219 16830 16163
18670 18719 19253 18261
20114 19579 20510 19785
20265 20611 20778 19882
14959 14438 14943 14694
7565 6470 6491 6834
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
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 
];
