A = [
12000 11548 56752 13350 12729 13076 12838 13643 13539 13675 14124 13869 14351 14350 13944 14424 14170 14350 14360 14235 14238 14490 14447 14453 15162 35314 36729 37497 57864 58878 61298 62043 62249 65071 64934 64629 64313 62831 62492 60662 60269 59768 58998 58197 57849 56934 55884 55107 54159 53269 52479 51018 50766 50244 49690 48648 48221 48044 46169 45329 44788 43947 43197 42353 42089 41390 40893 40004 38794 38117 37225 36644 36264 35134 34428 33716 33393 32618 31672 30755 30239 29520 28875 28446 27914 26802 26236 25557 24758 24369 23792 22912 22279 21943 21576 21096 20523 20237 19363 19146 18793 18113 17809 17192 16817 16398 16094 15603 15223 14759 14600 14137 13596 13364 13130 12947 12383 12165 11703 11637 11331 11064 10414 10500 10063 9885 9622 9260 8970 8991 8579 8415 8268 7776 7721 7533 7418 7127 6965 6894 6666 6462 6278 6043 5870 5768 5537 5448 5313 5252 5086 5070 4682 4808 4515 4525 4247 4192 4017 3985 3784 3758 3579 3496 3429 3318 3294 3126 3057 3005 2918 2843 2860 2706 2576 2573 2474 2430 2351 2305 2204 2179 2121 2006 1950 1957 1906 1813 1869 1809 1787 1633 1604 1650 1455 1506 1482 1427 1418 1415 1313 1314 1243 1222 1190 1131 1130 1097 1082 1055 1029 988 981 962 897 862 932 832 859 818 791 762 738 738 736 687 673 633 650 681 596 570 574 605 544 554 510 506 477 429 483 468 407 442 401 416 421 412 400 381 364 329 369 308 357 320 323 333 266 249 291 259 305 254 254 259 254 239 209 202 221 206 206 189 215 171 195 196 188 173 190 175 178 157 138 158 125 165 144 148 142 136 135 118 142 117 113 118 136 106 108 117 114 107 106 106 96 104 101 94 91 88 88 85 88 74 75 64 88 79 76 72 67 53 44 65 84 54 71 50 60 62 65 54 69 62 56 38 51 50 55 54 44 34 44 55 40 42 36 36 36 41 42 33 31 34 41 39 39 30 43 48 25 25 28 31 42 28 19 27 39 28 39 35 30 36 27 32 24 30 28 21 31 24 30 30 23 31 15 14 24 26 16 24 18 25 11 13 15 32 31 23 11 24 16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 0 0 0 0 0 0 0 0 0 0 0 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 0 0 0 0 0 0 0 0 0 0 0 0 0 
];
B = [
0 0 0
 25604 19475 6129
 13044 9751 3293
 30615 23815 6800
 27041 20962 6079
 14782 11556 3226
 36858 29270 7588
 16885 13288 3597
 31281 24937 6344
 34299 27193 7106
 7163 5698 1465
 49127 39397 9730
 15669 12585 3084
 6234 4947 1287
 25816 21064 4752
 10129 8213 1916
 2684 2109 575
 28569 23295 5274
 2257 1829 428
 1962 1544 418
 1171 950 221
 846 722 124
 369 301 68
 45728 37326 8402
 3241 2621 620
 3417 2773 644
 45421 37294 8127
 5599 4601 998
 2651 2145 506
 66195 54218 11977
 5748 4690 1058
 5363 4451 912
 47180 38874 8306
 6080 5067 1013
 52752 43612 9140
 7074 5901 1173
 7020 5894 1126
 89163 74295 14868
 11624 9792 1832
 19411 16423 2988
 91845 76830 15015
 21651 18412 3239
 37216 31260 5956
 72954 61207 11747
 16991 14382 2609
 30736 25670 5066
 91541 77227 14314
 29057 24434 4623
 6348 5342 1006
 176412 149869 26543
 6284 5318 966
 24064 20271 3793
 266626 228098 38528
 19838 16688 3150
 0 0 0
 461799 398804 62995
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 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 = [
0 0 0 0
0 0 0 0
0 0 0 0
0 1 0 0
1 0 0 0
2 1 6 0
38 1 23 3
354 2 36 12
1274 2 55 13
4817 2 79 30
12888 9 92 54
28139 4 117 73
46890 12 142 124
59271 18 216 210
51297 45 351 321
33629 67 502 535
16029 116 717 698
6530 181 940 860
2844 278 1230 1276
1962 465 1595 1552
2043 736 1808 1878
2332 1092 2235 2249
2855 1694 2655 2581
3393 2303 3142 3132
3959 2996 3823 3711
4475 3881 4461 4338
5222 4672 5005 4989
5865 5504 5568 5611
6341 6192 6154 6309
6814 6724 6700 6926
7343 7189 7156 7284
7349 7410 7484 7553
7657 7466 7513 7527
7730 7751 7882 7693
7620 7880 7769 7681
7640 7771 7684 7850
7650 7803 7816 7828
7706 7846 7822 7761
7767 7891 7747 7842
7869 7819 8015 8145
8046 8121 8162 8039
8374 8263 8281 8370
8502 8580 8641 8609
8715 8806 8749 8817
9249 9074 9115 9145
9473 9576 9510 9648
10070 9935 10101 9984
10250 10383 10370 10246
10774 10622 10693 10746
10878 10959 11120 10967
11289 11220 10890 11084
11163 11133 11074 11124
11124 11156 11163 10972
10711 10681 10887 10808
10587 10410 10494 10383
10023 9964 10065 10085
9492 9376 9569 9354
8505 8740 8813 8722
7928 7994 8055 7871
7270 7209 7180 7314
6473 6591 6551 6613
5864 5943 5946 5870
5169 5256 5326 5358
4849 4783 4889 4791
4548 4493 4405 4529
4464 4489 4476 4411
4301 4417 4353 4494
4683 4568 4373 4373
4169 4064 4165 4146
4243 4104 4325 4216
4070 4115 4019 4011
3775 3830 3728 3849
3659 3605 3473 3629
3080 3119 3086 3189
2544 2520 2602 2460
2116 2124 2097 2012
1614 1571 1457 1569
997 950 966 950
657 695 651 684
493 507 505 517
272 276 272 307
136 127 114 143
4 3 4 3
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
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 
];
