A = [
28016 27337 147978 23804 22577 21286 20231 19799 19399 18379 18110 17614 17254 16999 16644 16577 16515 16018 16088 16069 15531 15639 15522 15638 15605 20525 20509 20925 25887 25854 26280 26569 26734 26943 27466 27389 26983 26560 26319 25812 26160 25953 25748 25905 25761 25288 25142 24778 24400 24359 24381 24463 24166 24141 23690 23823 23526 23319 23335 22780 22954 22726 22841 22657 22489 22439 22440 22111 22116 21740 21392 21245 21542 20912 20891 21203 20601 20527 20094 20229 20044 19579 19891 19356 19428 19276 18964 19240 18630 18791 18340 18626 18085 18054 18036 17987 17636 17656 17495 17384 17436 17260 17076 17075 16871 16699 16736 16553 16277 16374 16239 15890 15853 15585 15785 15119 15398 15193 15055 14937 14908 14870 14550 14341 14292 14130 14292 13884 13802 13526 13496 13586 13578 13247 13269 13092 12921 12754 12676 12698 12496 12276 12474 12249 12012 11912 11865 11748 11559 11629 11727 11549 11352 11494 10967 11023 10875 10914 11064 10573 10729 10524 10208 10179 10134 9989 10088 9940 9778 9727 9572 9634 9349 9221 9329 9171 8995 9048 8868 8816 8901 8746 8489 8475 8449 8338 8396 8251 8249 7883 8071 7913 7854 7775 7783 7534 7572 7420 7441 7166 7486 7016 7098 7009 6906 6980 6836 6665 6762 6622 6624 6619 6435 6270 6050 6166 6050 6038 5819 5869 5828 5807 5789 5572 5403 5391 5467 5351 5193 5134 5230 5080 4936 5136 4775 4817 4798 4724 4411 4570 4543 4576 4507 4432 4310 4288 4202 4206 4112 4191 4141 4003 3912 3976 3803 3871 3882 3780 3676 3566 3572 3575 3515 3368 3411 3269 3344 3115 3296 3202 3108 3107 3095 3066 3057 2928 2852 2796 2911 2786 2851 2770 2768 2764 2750 2728 2572 2564 2604 2493 2463 2426 2366 2347 2260 2267 2162 2222 2238 2180 2153 2081 2141 2224 2082 1942 1995 1965 1996 1885 1921 1856 1825 1773 1773 1831 1712 1629 1665 1655 1647 1484 1427 1457 1464 1471 1450 1328 1398 1324 1292 1243 1290 1190 1209 1160 1246 1280 1230 1245 1261 1229 1193 1190 1158 1101 1029 1030 993 996 950 1190 973 945 1024 932 1283 950 917 910 925 884 867 855 768 811 784 750 778 782 701 698 707 687 674 730 702 686 645 597 604 629 560 625 640 531 547 573 603 543 629 548 674 624 604 589 598 509 520 513 507 525 471 526 586 614 506 457 409 433 409 402 401 404 408 396 397 348 396 326 320 302 319 311 325 313 299 306 308 382 295 252 294 263 302 307 297 308 282 250 186 218 235 236 221 228 217 218 222 228 179 243 191 184 225 178 186 171 180 169 188 160 170 179 190 206 175 199 166 180 244 201 194 181 170 162 129 132 134 133 119 139 142 116 126 153 124 136 142 111 133 116 127 137 127 117 121 121 116 111 118 111 121 158 116 116 126 105 82 108 101 107 108 104 121 99 95 95 85 106 78 77 77 106 85 92 102 78 90 97 88 99 92 86 89 103 87 160 145 142 155 144 169 200 161 280 196 302 221 180 226 176 161 170 182 201 148 134 138 161 132 176 107 166 108 68 61 53 68 54 79 82 83 112 103 137 107 137 99 94 100 90 70 126 123 70 76 80 77 101 88 80 83 116 103 85 74 79 88 67 46 48 61 53 43 53 49 48 47 53 55 46 41 48 60 56 37 41 59 55 45 38 49 54 39 45 44 34 37 62 51 48 52 55 49 47 48 41 43 35 51 41 45 42 30 40 44 32 29 31 42 35 33 45 43 40 35 26 37 34 38 41 21 29 48 33 40 32 45 43 25 32 27 33 32 34 35 26 18 23 28 28 37 28 42 28 25 36 39 31 29 38 28 32 31 20 31 34 21 20 22 25 23 25 32 19 31 39 27 35 32 25 19 22 22 19 21 23 32 28 27 39 34 34 25 40 21 29 37 31 26 31 32 54 111 142 115 86 98 120 77 61 89 114 62 61 140 78 73 76 95 128 94 58 38 38 42 44 18 26 21 22 21 23 30 15 31 30 32 25 62 43 37 58 45 42 37 48 42 36 32 45 33 42 47 40 73 55 21 17 18 16 25 19 24 16 27 15 22 23 34 21 26 26 30 13 24 17 45 16 23 14 20 23 12 15 16 12 25 17 20 21 16 16 9 22 18 20 18 19 22 11 17 15 22 24 26 22 19 20 22 23 27 16 15 15 18 18 17 18 17 17 18 19 26 18 21 11 14 10 18 9 10 12 9 15 10 15 18 10 18 13 21 13 13 13 15 14 24 14 16 20 14 15 15 17 14 15 23 13 10 17 13 15 18 16 23 6 17 16 12 13 9 9 13 13 17 10 16 16 13 11 10 13 15 16 14 19 21 29 28 11 19 14 17 15 19 13 13 9 15 19 8 15 20 8 10 10 15 11 7 19 8 14 11 5 13 18 9 4 9 9 6 9 7 7 11 8 11 8 3 4 6 9 11 8 8 6 9 10 3 7 6 8 9 6 7 8 9 1 7 7 5 6 15 9 7 7 12 13 6 11 8 6 11 11 13 7 9 13 5 16 5 10 5 9 4 8 7 11 3 8 11 6 11 4 6 11 10 4 7 6 6 7 3 7 9 7 6 11 8 8 5 7 10 6 6 7 4 10 7 7 3 6 6 2 8 6 11 7 8 8 5 11 4 8 3 8 3 5 5 7 11 6 11 5 7 5 6 1 7 2 7 4 7 8 9 13 8 4 5 13 4 1 4 13 5 7 3 3 6 4 7 6 7 2 3 7 6 1 4 7 5 5 3 4 5 4 6 3 5 3 3 2 4 4 3 3 5 5 8 8 2 8 7 6 5 5 4 3 2 6 4 6 9 4 3 3 5 3 3 8 2 7 5 2 9 6 2 4 4 2 1 5 5 3 5 4 5 2 7 4 12 4 8 2 8 2 7 2 8 9 6 6 8 5 4 11 3 11 5 8 9 8 8 9 7 9 1 4 3 3 3 2 6 5 8 4 14 5 8 2 5 3 4 7 3 3 1 6 8 10 7 4 4 5 5 8 0 6 1 5 4 4 3 4 2 1 4 1 3 3 5 2 2 1 1 3 2 6 3 6 4 9 2 3 5 3 6 1 3 4 3 3 3 4 2 6 5 2 2 2 3 3 2 1 2 4 2 2 5 4 3 3 2 3 1 2 4 2 1 6 3 4 2 5 2 1 2 1 4 8 6 5 3 6 5 1 2 4 4 4 4 1 3 0 2 1 2 2 5 3 3 1 4 5 1 1 6 2 1 1 1 0 1 1 3 2 3 6 1 0 0 2 1 3 3 0 0 2 2 4 2 4 3 0 3 1 1 0 1 0 2 2 0 2 3 3 4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 1 0 3 0 0 0 0 1 0 1 1 0 0 0 0 0 1 0 0 0 1 0 0 0 0 2 2 0 0 0 0 0 1 0 0 0 0 0 0 0 1 0 0 0 1 0 0 0 0 0 0 2 0 1 0 0 0 0 0 0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 1 0 0 0 0 1 1 0 1 0 0 3 0 0 3 2 0 0 4 1 0 0 0 1 0 0 2 0 0 1 0 1 1 0 0 1 1 0 0 1 0 0 2 0 1 0 
];
B = [
0 0 0
 12721 3794 8927
 6123 2027 4096
 20942 6841 14101
 14195 4314 9881
 8261 2408 5853
 20035 6315 13720
 16392 4795 11597
 9559 2925 6634
 28272 8587 19685
 27772 7731 20041
 5379 1712 3667
 81073 24030 57043
 11176 3400 7776
 3476 1044 2432
 18450 6437 12013
 6144 2193 3951
 1795 597 1198
 20080 6857 13223
 1674 597 1077
 1646 516 1130
 376 117 259
 12 2 10
 335 95 240
 31468 11937 19531
 1809 601 1208
 2382 777 1605
 30907 10786 20121
 1595 542 1053
 3272 1112 2160
 48784 16144 32640
 3272 1098 2174
 5753 1978 3775
 33371 11551 21820
 18649 6514 12135
 29939 10015 19924
 62671 21159 41512
 49906 17213 32693
 29138 9908 19230
 72975 25488 47487
 29461 10074 19387
 2079 698 1381
 73029 25800 47229
 1160 449 711
 1956 678 1278
 100756 35832 64924
 1846 596 1250
 23338 8082 15256
 141801 51897 89904
 22583 7773 14810
 1 0 1
 953240 358260 594980
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 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 3 0 0
3 0 0 0
1 0 0 0
6 0 0 0
7 4 0 0
13 1 4 0
37 2 16 0
31 5 8 1
51 3 8 5
166 6 14 19
326 5 15 10
710 5 16 13
1509 12 30 35
3674 6 53 26
8489 21 56 38
19432 34 60 94
39086 70 144 130
50616 188 191 185
41722 354 234 233
23145 445 290 301
7772 529 369 435
1329 628 435 488
543 627 506 381
525 728 599 461
480 704 567 682
473 1014 432 661
599 417 330 333
515 377 411 385
461 765 446 380
442 435 398 448
473 443 397 477
1173 463 503 426
534 539 518 469
595 561 620 565
658 639 555 594
702 707 713 678
784 822 802 775
889 865 827 866
965 961 967 1031
1089 1129 1152 1112
1237 1239 1284 1252
1472 1494 1421 1440
1614 1610 1631 1598
1867 1839 1871 1941
2186 2157 2103 2136
2312 2485 2500 2432
2694 2683 2909 2675
3027 3062 3063 3101
3368 3477 3386 3413
3789 3841 3660 3673
4108 4093 4161 4046
4416 4357 4336 4320
4728 4648 4716 4814
5029 4962 4929 5046
5400 5395 5822 5236
5705 5642 5669 5611
6068 6008 6096 6008
6651 6525 6373 6537
6926 6948 6900 6820
7640 7250 7113 7314
7842 7941 7956 7764
7856 7802 7898 7708
7690 7540 7802 7365
6959 6823 6521 6711
5303 6181 6066 4713
2608 3104 2858 2720
1278 2612 1786 1276
1142 1393 1739 1168
834 932 845 627
753 549 1094 458
319 334 379 447
395 311 262 308
20 14 6 9
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
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 
];
