A = [
15757 14507 27063 16225 15556 15326 14661 15608 15523 15343 16207 16570 17616 18206 18785 18724 19122 19167 19525 19083 19350 19588 19152 19577 19963 32400 33060 32966 45321 45801 48709 49713 49712 51435 52239 51753 51587 50331 50645 49756 49928 49629 49470 50067 50278 49144 48301 48303 46429 45886 46016 45201 45911 45241 45042 45070 44795 44095 42847 41930 41871 41161 40734 40945 40234 40712 39893 39636 38789 37390 36825 36096 36031 35873 35215 35174 34826 34426 33196 32904 31947 31432 30821 30535 30044 29740 29276 28721 28618 27703 26922 26127 25848 25101 25037 24569 24212 24360 23807 23460 22556 22294 21995 21721 21053 20882 20410 20491 20211 19849 19091 18673 18203 18124 17642 17607 17578 17250 16807 16799 16085 16044 15699 15263 15135 14963 14543 14175 13970 13678 13522 13195 12680 12720 12267 12208 12133 11962 11803 11412 11145 11261 11065 10657 10478 9974 9934 9843 9476 10651 9201 8881 8704 8423 8181 8032 7850 7653 7691 7504 7461 7337 7139 7207 6931 6909 7254 6797 6351 6207 6069 5751 5801 5775 5552 5428 5176 5143 5227 4798 5008 4691 4588 4747 4727 4427 4330 4243 4186 5647 4179 3740 3870 3721 3615 3490 3494 3360 3204 3117 3171 3068 2979 2988 2841 2863 2629 2627 2557 2617 2655 2517 2495 2338 2303 2302 2159 2166 2076 2087 2029 1892 1806 1835 1764 1766 1735 1650 1658 1622 1579 1546 1492 1388 1375 1275 1393 1330 1303 1317 1243 1197 1221 1198 1090 1149 1049 1007 1071 987 987 969 985 938 853 886 786 779 779 781 748 684 744 713 660 638 659 631 597 555 568 569 554 543 512 500 487 519 445 480 410 453 414 437 391 410 374 351 386 328 369 337 355 329 319 311 334 293 265 289 284 254 283 246 236 230 211 196 221 226 187 203 218 199 201 192 190 152 169 193 159 152 139 149 113 140 148 145 124 130 118 135 130 112 117 104 118 116 105 93 116 105 86 96 97 99 97 90 95 98 101 93 70 55 71 72 73 82 86 65 79 58 67 60 57 53 65 57 62 42 47 60 62 52 47 52 50 45 49 42 56 51 47 43 40 36 46 37 42 34 16 27 27 34 30 38 29 27 26 26 33 35 38 25 19 32 38 32 24 28 22 29 24 28 26 38 29 32 31 18 21 32 28 30 26 28 26 19 23 24 21 20 23 19 23 22 24 18 26 19 23 20 22 29 19 21 10 14 16 23 13 23 16 25 14 18 23 12 17 17 13 16 25 15 14 14 17 10 17 14 20 12 17 15 21 5 18 16 11 13 17 15 10 18 12 13 17 14 21 19 12 11 14 23 9 13 8 16 11 7 16 11 20 14 10 14 9 11 11 20 20 21 13 15 10 18 17 9 9 12 15 9 10 19 10 10 16 11 14 9 10 14 9 9 12 9 10 18 11 13 11 6 12 12 8 7 10 16 9 9 10 9 7 22 11 8 9 9 10 12 12 14 10 8 14 8 14 6 8 6 9 9 5 11 4 9 5 11 9 8 9 14 12 11 11 7 12 9 15 7 7 8 11 13 9 5 17 12 13 6 8 5 6 7 7 14 8 5 2 2 4 4 8 2 6 7 9 9 5 6 10 8 13 6 4 8 9 7 7 10 4 7 7 7 6 9 13 5 10 8 4 6 2 6 13 8 11 8 7 5 12 10 5 7 2 5 3 8 4 3 11 2 11 6 7 5 5 1 2 3 8 11 5 9 2 6 6 6 5 5 5 5 8 6 1 3 5 1 8 12 6 4 8 11 4 3 6 10 9 6 7 13 5 3 2 11 6 9 8 2 10 4 7 3 9 6 6 3 5 5 6 6 3 5 4 5 4 5 8 5 1 6 5 7 7 6 7 2 1 7 8 3 2 3 9 0 1 6 5 6 6 8 8 4 7 7 3 1 1 4 4 2 4 5 1 6 4 2 4 1 6 7 5 2 5 5 5 4 6 5 1 3 5 3 3 6 2 7 3 2 3 3 1 3 4 5 1 2 2 3 6 3 7 7 1 6 2 1 1 4 2 3 3 5 2 5 4 3 2 6 0 2 3 3 3 3 3 2 5 2 3 6 3 7 2 3 2 0 5 6 2 3 3 2 3 5 1 3 2 5 1 1 2 2 5 1 4 2 3 3 3 6 5 1 2 3 3 4 5 8 3 0 4 3 2 1 5 1 3 3 1 2 7 0 4 0 3 2 1 5 3 1 6 3 2 2 0 0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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 1 0 0 0 0 0 1 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 1 0 0 0 0 0 0 0 0 0 0 0 
];
B = [
0 0 0
 10076 7779 2297
 5657 4437 1220
 13646 11374 2272
 7188 5653 1535
 7076 5651 1425
 8322 6647 1675
 10465 8642 1823
 6873 5525 1348
 14232 11981 2251
 6137 4979 1158
 6516 5380 1136
 7191 5889 1302
 10624 8791 1833
 5256 4307 949
 12945 10741 2204
 7263 5898 1365
 7503 6203 1300
 8555 6844 1711
 13919 11127 2792
 8000 6639 1361
 16635 14021 2614
 11433 9447 1986
 11105 9421 1684
 18013 15201 2812
 26305 22281 4024
 5697 4889 808
 67080 57007 10073
 2786 2310 476
 4234 3644 590
 4614 3879 735
 8185 6870 1315
 2592 2199 393
 21828 18753 3075
 2034 1717 317
 3672 3137 535
 3346 2806 540
 6862 5709 1153
 1217 1028 189
 28258 24344 3914
 6 6 0
 335 287 48
 327 280 47
 3170 2728 442
 416 354 62
 467 394 73
 1098 942 156
 2465 2081 384
 44243 37645 6598
 3051 2609 442
 532 462 70
 1232 1088 144
 964 814 150
 2894 2448 446
 50375 43062 7313
 725 617 108
 3461 3095 366
 872 759 113
 3812 3352 460
 7053 6053 1000
 1742733 1519285 223448
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 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 0 0 0
0 2 0 0
3 0 1 0
14 2 10 0
144 0 12 3
983 1 35 7
4183 3 42 26
11979 3 64 41
31853 3 89 56
65561 9 132 108
113221 27 207 186
141953 66 290 322
133109 130 431 436
86052 170 623 597
38959 175 819 816
12614 296 1134 1125
3671 410 1381 1497
2216 718 1973 2259
2378 971 2469 2281
3678 1566 2760 2478
2966 2171 2737 2982
2830 2692 3033 3747
4086 3463 4621 4054
3661 5086 5010 4236
5167 5895 5240 5762
5956 6383 6634 6508
7677 7641 6562 8692
6512 9409 7734 7360
7001 8836 8613 7948
8491 10428 8296 9359
7929 10211 8950 8709
7880 11102 9754 10023
8782 9902 8524 8059
5609 7840 7843 7254
5871 6550 6111 6000
5630 6318 5866 5963
5623 6237 5963 5919
5940 6210 6026 5876
5851 6180 6052 6161
5844 6034 6013 6091
6039 6302 6056 6162
6410 6350 6523 6455
6524 6681 6633 6747
6903 7035 7168 7042
7393 7322 7269 7298
7781 7903 7894 7838
8337 8324 8144 8268
8509 8586 8438 8528
9001 8967 8860 8932
9080 9055 9069 9254
9189 9294 9161 9235
9123 9367 9359 9326
8793 8944 8952 8901
8631 8539 8468 8518
8040 8103 7779 7976
7255 7540 7466 7357
6657 6671 6776 6773
5963 5995 6110 6029
5257 5402 5381 5488
4758 4639 4799 4830
4153 4204 4278 4250
3878 3920 3800 3799
3774 3732 3770 3795
3613 3583 3576 3588
3441 3528 3392 3562
3471 3275 3291 3353
3359 3311 3186 3392
3280 3300 3197 3205
3126 3245 3097 3079
2869 2835 2811 2828
2561 2532 2489 2465
2164 2187 2129 2124
1737 1788 1726 1725
1210 1228 1337 1253
909 871 972 917
647 682 724 702
478 472 449 515
258 245 248 244
106 102 111 101
7 5 5 4
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
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 
];
