A = [
49 19 195 20 19 19 13 26 23 25 27 24 18 28 20 28 27 20 13 18 26 25 27 26 25 37 40 27 43 33 18 36 27 27 22 17 18 33 15 25 23 24 22 27 20 23 19 23 27 24 17 15 27 27 24 22 21 18 28 26 17 21 22 24 22 30 36 29 28 23 25 26 22 21 17 22 27 28 22 20 32 31 27 21 19 34 17 29 15 29 18 32 37 91 68 26 36 39 40 55 38 38 34 31 13 19 25 13 24 23 48 25 20 17 16 10 20 15 12 11 11 10 17 27 21 17 19 20 12 14 14 26 15 13 18 13 17 13 15 12 17 16 20 21 20 16 14 14 9 26 17 20 13 14 17 20 11 12 15 15 12 21 21 13 17 16 20 17 12 14 14 9 13 12 14 12 15 22 20 17 17 17 16 19 14 11 14 12 20 13 14 14 10 13 18 11 12 14 19 14 14 42 14 14 18 20 13 18 14 11 7 11 10 6 20 12 13 13 15 13 14 13 11 9 16 8 7 9 18 17 5 11 6 5 15 7 16 11 15 10 14 10 6 12 7 12 13 13 9 7 11 10 8 11 6 15 6 6 8 12 9 12 9 10 9 14 12 14 18 10 9 9 6 10 7 11 14 13 13 10 3 14 13 8 11 7 8 16 13 10 8 14 8 7 12 13 11 9 4 13 8 4 9 12 59 7 9 6 14 11 10 11 8 9 14 8 9 9 11 6 5 11 12 8 12 6 13 13 7 13 13 7 10 11 9 4 10 5 13 6 9 10 7 9 9 8 9 14 8 7 8 5 9 7 9 8 9 5 10 8 8 13 10 4 9 12 8 7 11 7 7 5 6 5 6 10 17 10 8 14 3 8 8 7 14 10 12 10 9 4 14 6 10 8 9 37 5 11 4 8 18 11 10 14 6 9 10 6 7 11 6 14 9 11 10 7 11 8 10 6 3 8 12 11 6 8 10 9 7 6 7 6 11 13 4 9 6 12 3 8 5 12 10 5 7 5 9 6 8 9 7 11 8 12 4 8 5 5 7 7 5 10 5 16 12 5 7 12 7 9 4 15 7 9 8 10 4 12 2 11 7 7 11 10 8 4 9 15 9 7 4 11 7 10 9 6 13 10 12 6 7 5 3 5 16 5 11 4 8 11 9 12 7 44 9 8 9 7 8 6 9 5 9 10 11 8 11 12 8 5 8 10 13 6 8 5 8 6 5 9 9 8 6 5 4 8 6 10 3 2 10 5 6 8 4 9 19 16 16 16 12 8 5 3 6 5 5 2 17 12 10 24 19 14 14 20 15 24 11 4 4 6 3 6 5 6 5 16 9 5 7 4 6 4 5 2 4 4 1 2 4 5 7 5 4 5 2 11 4 1 3 5 6 8 4 0 3 2 3 5 3 1 2 7 1 5 4 4 1 4 2 2 5 5 2 1 5 1 2 2 6 3 3 6 4 2 2 1 8 1 8 5 0 2 5 4 5 3 10 7 1 7 4 6 12 8 10 4 5 8 4 5 3 7 4 10 9 8 2 5 8 10 6 3 5 3 8 6 6 2 7 13 9 8 8 1 6 5 1 10 4 5 8 6 6 6 5 6 6 9 8 5 5 8 7 6 5 6 6 5 3 9 6 6 5 6 5 11 10 5 6 4 3 3 3 12 3 4 7 5 4 11 4 2 11 7 4 7 7 4 8 8 5 7 10 6 4 7 6 3 10 6 8 4 3 2 8 11 9 7 7 5 6 9 3 2 11 7 11 7 6 3 5 12 4 2 3 5 7 5 4 6 10 7 10 7 6 7 5 6 9 5 5 10 16 3 8 6 6 5 9 6 4 7 2 9 9 5 4 8 6 4 9 9 9 9 7 9 8 9 8 13 6 38 6 7 3 6 8 8 11 3 2 12 7 7 11 8 11 8 9 8 6 5 9 10 14 6 9 4 11 3 13 7 11 32 13 4 6 8 12 6 8 9 40 8 5 9 6 4 5 8 6 11 5 5 6 6 9 7 5 4 10 7 15 4 7 7 4 11 4 4 5 10 5 8 11 5 7 7 2 7 7 9 9 9 5 8 8 10 5 8 12 6 5 8 8 9 8 4 8 6 6 10 7 5 6 8 12 4 7 5 11 6 10 10 15 7 7 5 12 8 10 17 4 12 6 12 10 5 5 10 7 6 6 7 7 9 7 6 8 8 10 11 7 7 8 5 5 7 11 15 4 11 4 7 10 9 7 7 11 29 16 4 3 7 9 13 8 10 10 7 5 5 7 8 6 6 4 10 5 10 14 6 13 6 4 9 5 11 9 7 11 7 8 9 11 7 8 12 13 7 8 8 10 8 9 10 15 8 4 5 8 9 8 2 3 4 12 10 6 11 11 7 12 4 7 7 12 3 7 5 7 41 15 6 6 8 10 5 14 7 5 40 5 9 10 9 6 13 5 5 3 4 8 7 5 8 41 3 10 7 7 7 4 11 42 14 5 5 5 2 4 10 9 7 44 9 8 11 8 7 1 10 1 7 8 7 7 8 9 2 9 4 6 9 7 4 8 8 8 5 6 8 5 7 9 5 4 3 6 9 7 3 6 5 5 4 5 1 8 7 7 8 4 9 13 4 9 8 5 11 3 7 5 9 9 8 6 10 14 7 6 8 8 8 9 6 7 28 10 9 6 6 8 8 7 9 46 7 7 8 7 7 14 4 9 49 4 9 4 11 9 7 6 7 5 10 9 8 4 5 4 14 9 9 9 7 13 10 6 8 5 11 9 9 6 5 9 11 10 9 10 6 9 6 7 12 8 7 5 3 10 3 9 11 8 12 9 7 5 6 12 17 13 5 2 12 8 5 42 7 10 5 3 7 10 29 8 6 5 7 9 10 7 6 11 8 6 9 5 7 4 8 6 15 10 6 9 9 3 6 9 11 14 4 7 8 4 10 4 3 8 7 13 4 7 3 5 6 10 9 15 4 9 10 5 7 9 9 5 3 4 10 6 6 3 2 10 5 10 8 9 7 8 9 6 6 13 5 4 8 8 6 4 7 11 4 9 10 8 5 12 4 6 6 7 4 46 5 8 9 10 3 11 7 5 7 5 7 5 8 10 8 7 11 15 26 8 12 6 6 9 9 13 4 11 10 9 9 13 6 11 7 8 11 6 2 8 4 4 10 5 16 10 7 9 2 4 4 4 8 3 9 12 7 4 8 9 6 9 7 7 10 4 10 4 6 11 11 7 11 9 6 5 11 7 10 5 2 10 8 8 9 9 3 5 8 8 8 4 10 5 8 11 7 9 4 7 40 10 8 7 9 5 7 6 9 9 10 9 9 6 10 6 4 7 8 13 5 8 3 5 7 10 3 9 4 9 15 7 8 5 11 7 10 5 6 7 9 12 8 6 7 10 11 4 5 7 3 3 8 8 11 8 7 7 3 9 2 14 10 7 5 6 11 11 9 3 5 7 7 4 9 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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
 36031 35275 756
 56690 55503 1187
 36107 35363 744
 163926 161036 2890
 19522 19137 385
 53505 52473 1032
 23844 23455 389
 46570 45808 762
 5620 5442 178
 186822 183479 3343
 3096 3072 24
 49696 49249 447
 11900 11747 153
 77422 76419 1003
 17751 17561 190
 9949 9817 132
 69821 69248 573
 25399 24976 423
 334067 328555 5512
 105470 104415 1055
 14384 14259 125
 110399 109630 769
 36371 35998 373
 41169 40654 515
 597449 590348 7101
 58419 57803 616
 1843629 1830930 12699
 82908 82327 581
 117198 116257 941
 206167 202854 3313
 159854891 158766365 1088526
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 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 = [
11761 2676 281 312
3308 277 20 23
4100 421 31 34
2960 508 44 51
1129 458 70 81
937 575 355 391
22633 721 1007 1062
131831 758 1349 1411
491020 846 2068 1994
1484685 1206 2889 2994
3286356 1328 3644 3672
6852237 1787 5169 5214
11731390 2368 6585 6766
18086215 3311 8487 8750
23423768 4280 10136 10093
27732038 5664 11371 11804
27474377 6991 11785 11692
21874406 8441 11565 11704
12715030 9927 11714 12065
4327751 11515 12662 12735
661165 12954 13663 13640
54313 14578 14940 14737
22582 15831 16461 15777
22277 17904 17883 17804
25989 19814 19170 19131
28365 21125 20789 20314
29046 21167 22060 21158
28461 22948 22420 22041
27466 23516 22558 22059
27099 23444 23228 22873
36369 23503 22347 21918
34319 21843 21518 21033
46234 20974 20408 20646
34127 20173 19465 18956
18550 18502 18578 17747
17125 17404 16794 17324
15936 15571 15398 15633
14528 15407 14069 14121
12859 14745 13121 12828
12185 13655 12181 12035
11464 12386 11869 10516
10809 11612 11410 10221
9738 14622 9806 9676
9144 10436 10630 9131
8942 10170 9235 9398
8456 10800 8714 8520
8024 8877 8031 7928
7565 7832 7696 7381
7268 7463 7470 7378
7081 7109 6999 6883
6480 6702 6574 6452
6053 6418 6133 5832
5583 5750 5486 5553
5376 5839 5364 5469
5437 5675 5287 5403
4906 5340 5026 5088
5030 5677 5128 4891
5353 5245 5210 5116
5701 5813 5669 5501
6046 5923 6166 5982
6747 6628 6626 6606
7169 7140 7277 7377
7991 7993 7771 7941
8484 8524 8495 8481
9215 9261 9319 9275
9652 9864 9899 9888
9912 9982 10091 9837
9967 9898 9798 9678
9313 9304 9469 9578
7870 7946 7980 7866
4192 4278 4332 4167
747 787 734 788
0 1 1 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
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 
];
