A = [
106391 94877 589309 48732 34638 34957 35987 37152 41908 51344 97373 142993 168699 213830 267910 296106 310073 320346 313995 304872 289367 274222 263725 259870 260923 253925 241675 223604 194519 147670 137643 116269 62636 55674 47006 42995 38618 32950 31295 28545 27055 26170 24831 22955 21559 19520 17735 17887 16726 14056 14054 14225 14558 14795 15090 15778 16150 16428 16809 17153 17699 18146 19070 19499 20241 20702 21697 22406 22673 23205 23979 24219 24803 25554 26418 27112 27721 27995 28626 29188 29851 30199 30875 31022 31479 32244 32668 33377 33869 33985 34044 34649 34681 35052 35578 35519 36115 36782 36480 36488 36541 37063 36788 37086 37061 37415 37672 37295 37511 37587 37507 37196 36906 36799 36900 36458 36921 36411 36716 36429 36588 36380 35863 35780 35785 35385 34987 34692 34667 34476 34305 33597 33408 33135 32491 32127 32200 31771 31704 31393 30966 30649 30969 29831 29767 29231 28992 28392 28562 28172 28195 27928 27574 26736 26390 26288 25737 25584 25714 24991 24727 24633 24122 23983 23077 22845 23131 22574 22116 22113 21833 21395 21301 20956 20728 20247 19609 19689 19218 18966 18782 18391 18232 18023 17676 17479 17047 16631 16754 16355 16430 15960 15524 15597 15141 14753 14932 14324 14501 14032 13791 13877 13689 13385 12823 12699 12738 12375 12187 11989 11776 11742 11285 11077 11069 10848 10555 10505 10151 9910 9968 9968 9684 9397 9313 9007 9119 8928 8554 8596 8412 8264 8057 8121 7895 7659 7730 7628 7225 7270 6952 6984 6899 6780 6742 6400 6422 6498 6199 6139 6048 5787 5782 5646 5597 5455 5482 5204 5118 5112 4975 4925 4770 5019 4670 4467 4396 4412 4294 4154 3992 3992 3944 4005 3786 3796 3786 3632 3531 3455 3350 3405 3334 3150 3114 3107 2989 2921 2817 2865 2787 2703 2746 2597 2599 2605 2554 2444 2354 2398 2348 2252 2186 2083 2031 2100 1985 1922 1981 1911 1810 1821 1774 1810 1677 1581 1582 1674 1571 1566 1486 1489 1498 1386 1354 1379 1433 1292 1308 1198 1159 1239 1209 1249 1127 1120 1170 1028 1110 1047 1018 965 942 962 955 897 893 886 884 807 755 831 737 778 739 798 719 678 695 654 673 701 591 605 576 547 583 548 515 547 539 526 510 478 454 469 491 435 409 443 394 379 409 374 378 392 346 360 374 405 406 355 349 356 325 312 310 343 318 294 294 259 280 290 254 246 218 240 215 205 229 207 200 225 228 239 222 203 189 182 212 182 182 184 207 155 175 183 183 180 189 182 171 174 168 180 182 154 153 166 152 160 163 152 154 137 144 132 147 126 147 155 108 137 107 116 142 118 119 116 131 128 121 99 107 106 110 89 105 116 104 131 96 100 107 114 129 91 88 75 91 78 101 94 95 95 118 90 92 105 79 98 105 96 85 76 88 83 74 58 67 61 97 86 72 88 81 85 73 77 61 63 71 54 75 60 73 58 64 58 62 122 48 51 43 51 67 69 65 54 50 59 62 66 50 50 61 48 51 76 60 65 69 64 72 60 71 51 73 62 51 59 69 71 43 70 68 59 76 66 41 56 58 72 40 37 53 59 51 42 50 49 53 55 48 65 32 65 69 58 57 52 52 68 58 68 58 57 57 47 42 51 45 51 55 56 57 80 51 96 61 49 57 56 45 53 59 68 54 50 47 52 58 48 46 58 38 49 54 63 34 46 54 56 56 57 47 67 50 54 46 57 64 36 45 58 52 30 47 62 49 34 29 38 31 39 44 28 46 40 42 49 35 40 43 35 61 37 38 48 40 42 69 30 51 43 34 52 51 56 33 27 46 38 33 49 40 36 47 43 37 43 47 40 54 39 42 40 53 39 53 47 54 38 48 53 39 57 42 40 51 30 36 66 44 43 41 37 32 44 41 29 35 33 37 32 27 44 34 52 40 54 44 49 59 51 84 48 46 53 54 44 61 52 49 49 58 58 48 49 51 37 44 49 41 50 49 38 47 44 34 33 41 35 31 43 24 34 33 39 28 43 38 35 37 62 50 48 52 44 27 45 44 53 47 41 37 39 34 30 24 32 22 32 27 28 32 39 17 35 34 80 31 26 20 87 28 29 21 25 18 24 31 30 34 39 34 45 34 27 41 34 17 33 24 23 25 23 30 24 21 25 24 14 16 15 19 21 19 19 21 16 23 28 25 19 23 20 25 24 19 18 29 29 34 21 22 28 18 22 25 15 19 29 20 26 19 22 21 20 36 16 22 21 14 21 17 23 31 25 31 22 26 13 18 25 18 22 18 29 93 18 18 15 16 18 21 18 20 15 15 16 19 26 20 15 20 19 17 18 18 21 18 25 21 16 13 14 16 15 20 18 24 10 19 24 19 21 27 26 21 21 21 12 30 20 23 20 16 24 17 12 21 12 23 16 17 12 19 22 17 14 8 30 21 13 16 12 10 16 23 26 26 39 27 22 16 34 29 22 29 16 33 27 19 17 25 16 18 14 29 13 11 14 14 16 18 14 19 8 19 7 20 18 17 15 19 19 18 18 8 16 12 13 12 21 9 17 17 16 28 17 18 13 12 15 14 25 22 16 12 24 23 19 22 21 23 25 21 16 22 17 17 18 16 20 16 17 17 25 17 11 19 11 14 16 10 5 11 10 11 14 15 15 9 8 13 14 13 12 12 13 9 10 12 11 10 5 9 9 11 5 9 15 5 9 12 7 8 11 14 6 12 14 11 17 14 11 14 10 9 7 9 8 7 12 23 8 11 14 18 13 6 12 9 10 13 17 6 13 6 8 10 14 9 13 15 12 10 14 13 14 11 15 20 9 14 13 11 8 8 10 10 10 11 11 13 8 13 8 7 11 6 11 6 8 8 7 9 9 8 7 5 10 5 2 7 1 4 6 5 4 3 7 7 8 1 9 5 6 2 6 5 5 3 8 6 3 3 12 9 9 19 15 10 9 11 11 9 13 7 19 4 10 15 9 12 12 13 10 8 5 5 5 5 8 4 9 2 9 3 7 9 4 10 7 9 3 5 7 5 6 4 3 3 6 6 6 7 11 5 10 8 3 13 7 2 9 3 2 4 4 3 7 8 4 9 26 4 8 29 27 16 12 5 7 8 3 3 7 6 8 5 11 3 4 7 8 5 3 6 6 4 3 4 4 8 7 10 12 5 11 3 5 9 3 4 4 7 9 8 8 4 4 1 4 4 6 1 5 3 11 3 9 5 3 10 5 3 8 8 7 4 4 3 4 2 1 2 4 2 3 5 4 2 3 4 2 3 12 5 10 7 9 8 7 7 7 14 6 2 7 10 9 1 8 6 3 7 3 4 6 5 5 7 4 4 3 2 11 9 3 4 8 5 3 4 4 2 4 5 4 7 4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 1 0 0 0 0 1 0 1 0 0 0 1 0 0 0 2 1 0 1 0 0 0 0 1 0 1 1 0 0 1 2 1 0 0 0 0 1 0 1 0 0 0 0 1 1 0 1 0 0 0 0 0 0 0 0 2 0 0 1 0 0 1 0 0 0 0 0 0 0 1 0 0 1 0 1 0 0 5 2 0 0 0 0 1 1 2 0 1 0 2 1 2 1 0 0 0 1 1 0 1 0 1 2 2 3 2 1 0 2 1 2 0 1 5 4 1 1 3 5 0 2 1 1 0 
];
B = [
0 0 0
 9445 4817 4628
 11991 6040 5951
 13807 7553 6254
 10472 5550 4922
 12071 6506 5565
 14866 8476 6390
 17717 10237 7480
 19939 11452 8487
 25156 15366 9790
 17470 10536 6934
 44939 32811 12128
 13140 8788 4352
 15042 11224 3818
 10008 7628 2380
 5479 3665 1814
 3358 2192 1166
 4147 2801 1346
 2604 1643 961
 3518 2214 1304
 2840 1705 1135
 4986 3209 1777
 4737 2947 1790
 6063 4073 1990
 4712 2904 1808
 8124 5510 2614
 6778 4570 2208
 13097 9350 3747
 5661 4440 1221
 11589 9005 2584
 6471 5207 1264
 5851 4621 1230
 6313 5284 1029
 7018 5821 1197
 5577 4724 853
 6354 5273 1081
 5096 4158 938
 4318 3632 686
 6847 5909 938
 5244 4437 807
 5369 4654 715
 6273 5318 955
 5529 4793 736
 9563 8308 1255
 7421 6539 882
 5404 4857 547
 5649 4971 678
 8911 8074 837
 7113 6268 845
 10077 9236 841
 5219 4682 537
 5917 5376 541
 10457 9624 833
 5343 4831 512
 12128 11176 952
 7349 6591 758
 10945 9974 971
 8571 8100 471
 7959 7246 713
 15041 13853 1188
 5506553 5337917 168636
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 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 = [
4 2 1 0
4 1 0 0
17 0 6 0
56 1 5 0
51 0 4 0
128 1 10 0
230 0 7 0
55 1 19 1
132 2 36 10
1777 2 34 10
34159 6 41 11
229698 5 39 23
645131 3 34 31
1109255 22 49 47
1238571 120 49 34
1078665 16 65 51
703929 52 76 70
339805 63 100 76
107981 62 98 99
15815 101 125 136
899 154 170 189
670 185 223 210
464 251 239 224
661 408 249 277
540 390 296 316
548 460 354 389
802 628 355 424
819 3385 463 496
1036 1110 541 554
1056 949 615 778
1149 1259 639 743
1498 1392 781 739
1627 1402 857 914
1289 1217 930 994
1674 1444 1042 1140
1352 1372 1272 1130
1706 1541 1198 1223
2003 1873 1278 1326
1727 2238 1426 2119
3010 3620 1507 1643
1871 1829 1573 2139
1706 1717 3490 1855
1779 1777 1667 1651
2205 3205 1775 1704
2439 2404 1701 1683
3555 3710 1913 2015
2669 2616 1890 1784
2359 2327 1999 1992
1892 2352 1953 2181
2132 2176 1760 1841
1774 1714 1749 1698
1713 1713 1770 1833
1624 1607 2131 2018
1529 1563 1491 1542
1531 1539 1554 1470
1470 1535 1379 1445
1385 1419 1301 1509
1430 1534 1200 1254
1083 1095 1066 1080
929 933 874 1060
936 1204 870 976
539 547 535 504
283 260 287 243
61 67 61 72
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
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 
];
