A = [
240284 199806 208851 204502 205869 197047 185605 180596 183151 176382 177778 176384 173310 171192 169528 169780 166379 164154 163586 161885 159346 159320 156436 153173 154179 153401 148461 146331 142925 139943 139739 139254 137215 140772 138481 136001 136590 134191 131985 132285 130647 128188 128501 126385 124686 124771 123038 120551 120961 118186 116978 117125 116738 114760 114914 112506 110687 110326 108668 107504 106573 106110 105875 104911 102927 101782 102591 100530 99458 99737 98079 96635 97368 96377 93592 94255 93318 92040 91239 89475 89122 89757 87779 86363 85975 86215 84068 84781 82880 81835 81507 79930 79252 80051 78546 76572 76316 75711 74792 75422 74411 72200 72979 71920 70129 70760 69952 68507 68855 68001 67182 66470 66767 64623 64861 64281 62784 62825 61827 61079 62441 60611 59119 59161 59299 58176 58107 57764 56760 56619 56148 55743 54905 54945 53986 53613 52924 51954 51831 51315 50222 49954 49884 49376 49142 48052 47343 48014 47282 45856 46191 46151 44515 44887 44573 43823 44259 43186 42669 42880 42656 41754 41079 40601 40349 40344 39995 38960 38952 38550 38106 38364 37767 36848 37142 36243 35454 35468 34970 34760 34876 34074 33657 33554 33028 32934 32639 32408 31196 31569 31810 31072 30592 30108 29668 29932 29610 28877 28809 28344 28451 28698 27336 27464 27580 27166 26656 26452 26311 25802 25859 25340 24982 24718 24930 24312 24224 23521 23510 23081 22840 22797 22444 22701 21838 21588 21616 20815 20967 20655 20224 20222 20223 19775 19443 19726 19724 18956 18887 18487 18235 18347 17974 17652 17135 16925 17262 16709 16119 15949 15394 15730 15419 14883 14653 14740 14481 14289 14196 13628 13610 13015 12836 12993 12458 12413 11902 11926 11860 11493 11162 11063 10967 10812 10799 10337 10333 9951 9699 9904 9507 9417 9321 8914 9083 8776 8744 8591 8474 8492 8013 7907 7863 7740 7523 7382 7105 7136 7017 6718 6808 6892 6486 6504 6450 6277 6243 6159 5717 5840 5563 5697 5532 5343 5534 5147 4958 5188 5046 4928 4930 4845 4711 4536 4554 4424 4324 4336 4276 4140 4093 4119 4015 3949 3976 3952 3886 3923 3663 3596 3515 3463 3543 3402 3217 3225 3236 3124 3175 3107 3009 3040 2999 2921 2965 2893 2923 2850 2776 2754 2691 2585 2539 2656 2666 2592 2617 2544 2404 2459 2486 2437 2290 2177 2243 2310 2055 2200 2175 2020 1996 1991 1994 1925 1905 1914 1878 1916 1863 1821 1807 1731 1753 1765 1652 1772 1800 1706 1625 1576 1639 1555 1639 1519 1629 1644 1582 1447 1492 1524 1432 1489 1401 1365 1460 1338 1388 1333 1316 1297 1282 1316 1232 1287 1400 1356 1327 1313 1294 1293 1302 1179 1122 1208 1245 1191 1185 1073 1183 1176 1169 1148 1134 1114 1144 1217 1081 1065 1062 1000 1020 1068 1011 1024 1038 1056 1071 1013 1026 1010 1052 993 987 1039 1084 991 969 866 924 925 915 981 1051 915 927 898 889 855 896 847 761 822 774 811 746 811 814 756 829 784 873 793 734 735 706 734 722 743 737 698 743 752 737 692 726 746 744 706 716 698 667 641 633 617 619 580 644 621 597 577 588 582 645 585 576 561 562 567 587 559 572 534 549 586 548 523 512 600 468 556 512 458 488 446 446 486 525 472 558 537 443 424 487 459 484 457 417 459 423 443 404 419 455 453 432 450 439 420 373 419 416 413 446 372 403 393 388 370 372 439 390 395 409 449 431 377 344 357 361 410 343 380 384 360 345 361 386 373 291 326 324 327 313 319 320 392 299 338 330 299 314 349 322 336 299 274 266 321 288 255 266 279 271 276 303 234 292 244 268 269 252 259 266 236 238 283 245 221 297 261 236 270 248 238 244 237 212 213 251 215 228 245 213 185 204 207 211 214 226 179 190 180 196 199 220 218 160 193 189 174 197 197 194 173 164 200 229 167 180 195 183 176 163 164 182 179 170 208 149 126 134 181 169 177 159 161 162 186 175 152 145 144 116 147 152 165 151 153 140 140 189 147 142 180 145 135 147 135 142 164 126 150 118 116 141 129 99 115 124 142 138 127 120 123 120 124 133 116 130 107 127 118 103 101 109 128 122 132 117 118 98 108 111 114 111 87 107 88 104 109 96 103 104 90 96 90 98 84 122 108 102 103 83 83 91 86 86 82 112 128 104 84 91 94 79 101 92 78 68 65 69 79 73 85 78 77 50 80 80 77 73 65 71 65 84 62 80 73 74 84 75 67 73 83 79 63 89 54 67 53 60 67 59 60 68 68 50 56 64 62 40 56 67 66 47 52 56 47 51 47 45 75 49 57 56 63 50 57 71 44 49 60 58 54 56 58 41 51 36 41 48 37 35 47 33 32 53 52 42 41 43 41 45 47 43 45 48 45 47 38 47 35 42 35 40 44 33 68 79 51 58 55 52 46 44 44 53 53 57 59 59 65 49 45 37 47 47 56 42 46 50 54 39 43 46 44 40 44 55 42 35 63 45 34 52 48 44 42 34 62 46 67 41 37 58 58 37 57 44 43 29 34 54 52 39 31 46 46 54 38 39 39 48 47 40 38 33 33 24 32 38 35 32 32 32 23 43 43 25 32 44 37 33 31 37 40 40 41 24 50 46 35 34 38 44 29 29 23 19 32 36 33 40 34 39 30 36 27 35 30 35 28 21 48 27 36 32 43 31 23 28 34 22 37 18 19 25 29 27 33 15 22 26 17 31 19 26 28 27 52 26 24 26 37 55 38 42 32 33 30 35 40 39 34 36 27 30 27 29 29 30 37 20 23 27 24 31 47 20 18 15 26 25 16 37 19 24 14 34 22 35 30 25 18 18 19 27 27 25 25 22 22 26 37 31 24 25 39 14 18 22 21 30 40 23 20 19 24 28 17 15 29 18 21 22 27 36 17 23 17 26 26 29 29 14 26 26 20 33 37 33 18 13 12 39 23 18 18 18 19 27 23 18 29 18 22 19 15 31 25 18 22 29 16 21 21 25 17 21 8 26 17 18 19 16 17 9 12 9 15 13 13 12 18 15 14 8 17 34 18 11 11 23 12 16 51 13 8 14 21 5 20 36 14 11 12 15 12 12 14 12 21 13 13 21 9 13 11 17 9 16 18 18 10 15 14 16 11 15 12 18 17 6 10 13 17 15 12 21 14 12 13 18 14 15 17 16 20 14 21 11 15 14 13 17 12 13 13 22 8 12 19 23 43 19 21 12 25 21 20 16 11 18 14 15 14 10 13 22 19 10 15 18 8 16 16 11 24 13 17 8 16 18 10 15 13 13 7 14 14 18 15 15 6 13 12 12 8 11 13 9 9 6 10 20 15 14 24 19 12 10 17 21 8 12 22 12 11 11 12 10 12 18 14 15 10 11 11 17 13 17 11 8 15 20 18 11 9 12 37 16 11 13 17 15 16 5 14 8 13 15 9 23 9 7 10 14 12 8 10 14 6 18 10 7 10 9 5 8 11 7 14 13 11 9 7 12 19 8 8 3 14 13 6 11 8 7 15 11 13 10 9 11 30 21 7 11 11 8 10 5 2 13 10 9 7 3 6 9 6 7 10 9 6 8 7 5 5 10 7 7 6 5 6 8 7 10 9 9 5 9 8 7 6 10 10 6 15 7 12 16 7 15 9 8 8 14 6 6 12 10 8 10 7 3 3 6 6 10 7 10 21 6 7 9 1 2 13 11 6 2 9 9 6 8 4 12 15 17 2 10 6 14 7 11 2 13 12 23 2 8 3 13 5 8 5 5 6 9 4 3 2 2 3 5 2 4 7 5 4 11 7 20 19 6 6 13 11 8 21 15 5 10 12 15 14 6 15 9 4 6 7 12 3 6 2 9 7 5 7 8 8 8 6 7 8 4 8 7 12 8 8 13 5 6 11 10 11 3 2 6 8 4 6 14 7 14 15 12 17 6 4 10 6 6 8 7 4 13 11 9 13 15 5 10 6 9 17 11 5 10 9 7 5 9 13 10 10 10 9 10 4 4 15 4 5 8 13 11 6 6 3 11 2 8 18 7 4 4 6 3 5 2 4 9 9 3 5 6 8 6 7 9 2 14 19 3 3 9 10 7 4 9 8 4 5 7 6 3 5 6 9 7 6 5 3 4 5 2 7 8 3 6 6 8 2 1 3 10 8 9 5 3 12 12 7 10 8 12 7 4 8 2 8 9 8 8 9 6 5 7 4 6 4 4 3 2 3 1 0 0 2 3 1 1 3 0 7 2 0 3 1 1 5 5 12 5 1 1 2 25 1 4 1 9 2 1 2 2 6 5 3 4 5 3 3 0 3 3 1 15 15 0 1 1 5 0 5 2 4 4 1 5 1 5 2 2 2 3 3 2 4 6 11 10 0 1 1 2 4 0 4 5 0 1 2 2 8 4 0 3 1 0 1 4 2 1 2 1 3 1 0 2 1 2 4 2 3 3 2 5 1 2 5 8 15 3 4 2 1 3 1 2 0 2 2 2 2 3 2 3 2 1 1 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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 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 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 = [
1 6 0 0
0 0 0 0
0 1 0 0
1 0 0 0
0 2 1 0
1 1 4 2
249 2 7 11
877 4 12 16
2716 2 27 20
6685 11 46 42
11392 10 59 45
18480 14 95 90
28600 35 136 165
53660 72 218 232
122658 172 379 366
383792 376 483 529
2682382 634 582 628
2814983 983 611 569
1160500 1236 677 718
133535 1463 929 928
1910 1699 1239 1255
1685 2089 1579 1597
1914 2405 1859 1914
3040 2872 2139 2157
2978 3412 2550 2465
2928 3697 3057 3151
3172 3882 3250 3447
3531 4121 3719 3633
4052 4289 4081 4005
4466 4787 4656 4652
5004 5270 5152 5104
5797 5896 5736 5832
6360 6711 6614 6426
7323 7330 7202 7123
8185 8262 7988 7999
9006 9118 9234 9083
10234 10339 10156 10199
11340 11344 11506 11356
12855 12875 12761 12752
14335 14383 14278 14337
16170 16571 16202 16070
18106 18077 18242 18219
20059 20327 20255 20012
22029 22198 22115 21833
23256 23805 23733 23414
24651 24497 24694 24781
25440 25386 25813 25204
25700 25910 25885 25847
26100 26140 26299 25729
26309 26497 26725 26425
26641 26279 26102 26348
26307 26350 26395 26161
25526 25441 25521 25567
23884 23861 23972 24071
21649 21652 21638 21368
17997 18033 18124 17801
14917 14817 14835 14969
12933 13072 13046 13144
11942 12151 11899 12093
11837 11951 11860 11997
12755 12884 12914 12950
14788 14832 14771 14908
27893 27386 27343 27628
8909 9203 8855 9043
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
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 
];
