A = [
7697 7697 9040 8554 6929 7195 6753 7198 6592 6529 6805 6485 6386 6195 5873 5609 5319 5350 5189 5082 5293 9133 8617 5485 10331 9471 5790 6236 6603 5955 5946 5789 5852 5814 5513 5869 6675 5627 5939 6994 5759 5487 6009 5660 5373 5361 5298 5136 5356 5280 5104 5445 5379 4964 5268 5247 4819 5184 4935 5017 5179 5143 5017 4992 5152 4897 4744 4630 4732 4658 4670 4697 4702 4637 4432 4341 4295 4249 4062 4036 4125 3934 3762 3814 3793 3650 3479 3312 3258 3180 2996 2928 2774 2840 2729 2537 2488 2342 2112 2064 1972 1882 1821 1711 1649 1651 1487 1476 1376 1378 1329 1333 1296 1273 1190 1155 1120 1144 1136 996 1099 1005 1049 1048 1033 1028 1037 1035 939 938 984 883 950 959 908 876 861 879 898 820 865 736 815 812 763 727 764 784 761 771 696 709 694 644 712 647 635 673 633 612 584 574 581 516 579 568 532 589 528 508 487 475 521 506 458 463 436 416 446 445 431 366 414 397 423 403 384 376 360 385 372 361 341 366 334 341 291 336 292 315 338 260 293 294 289 255 275 244 278 275 256 272 246 272 246 218 260 197 220 219 216 216 217 205 153 197 212 188 163 197 193 173 173 162 183 170 177 153 173 166 150 180 153 133 137 151 128 159 145 123 135 122 141 141 116 115 129 123 125 116 113 113 123 118 102 102 105 99 97 118 107 107 93 117 96 95 79 84 99 119 89 76 93 83 94 77 81 104 92 75 89 75 78 75 82 72 78 79 67 75 54 63 87 70 77 71 68 79 64 79 73 72 60 56 63 72 55 68 50 50 67 68 55 52 66 70 60 56 69 68 51 64 53 42 58 66 61 55 64 46 51 51 55 65 48 47 48 45 62 40 56 46 54 53 56 52 59 50 48 53 54 39 47 51 46 51 48 45 45 36 42 50 37 37 35 34 40 43 44 43 44 56 42 34 39 32 36 50 35 44 39 35 32 34 33 38 37 42 38 39 42 25 32 38 42 44 38 33 25 36 48 25 36 34 31 32 26 31 25 30 25 31 37 32 32 26 23 29 31 29 28 29 22 34 27 29 25 18 26 33 22 25 21 32 32 29 28 40 17 26 17 22 21 24 29 35 29 27 25 27 29 31 29 37 27 29 22 23 29 17 22 21 28 25 20 25 20 22 18 30 23 29 23 12 32 17 20 22 30 24 23 18 29 18 20 20 26 55 20 22 23 14 25 25 27 19 17 19 11 18 23 26 16 15 21 19 16 12 23 19 20 14 26 18 21 14 22 16 17 20 8 17 24 12 21 17 16 15 17 16 18 18 13 21 17 13 11 20 17 12 18 28 17 21 10 10 24 14 13 13 14 11 15 10 16 16 12 16 22 22 22 7 12 9 10 8 17 16 21 15 15 11 22 16 21 15 14 10 15 16 6 13 20 12 7 14 14 9 9 19 13 12 15 14 14 12 13 20 11 19 11 12 13 17 14 14 14 11 17 8 9 10 12 12 15 7 10 9 13 15 14 20 10 15 9 9 7 16 8 10 11 13 10 15 6 7 7 18 15 10 3 5 11 8 9 11 14 13 9 9 12 8 8 16 7 10 11 8 5 12 9 5 4 13 10 5 7 8 9 10 17 10 3 11 7 15 11 10 6 8 12 10 7 6 7 9 9 4 8 9 4 7 15 9 8 11 9 4 8 10 7 10 3 12 8 8 6 8 15 6 8 7 8 4 11 4 5 9 7 7 5 4 10 2 4 13 6 4 8 8 10 10 10 11 5 6 17 8 2 11 4 6 4 1 4 7 9 7 7 4 2 12 2 8 6 4 9 4 12 3 3 2 13 0 13 8 7 5 8 6 7 5 3 6 4 6 1 6 7 5 6 9 6 8 8 6 5 6 6 4 8 7 5 3 5 6 5 8 7 9 9 8 4 5 8 7 4 2 3 3 3 5 5 4 4 5 8 6 4 4 2 3 7 2 3 6 1 4 4 9 3 3 4 4 2 3 2 4 4 8 5 2 5 7 4 2 1 3 8 5 4 5 4 1 3 3 2 0 2 11 1 3 5 5 3 9 3 5 5 7 4 1 4 3 2 7 2 7 2 3 7 8 2 4 3 2 2 1 4 4 3 3 4 5 4 3 1 3 3 5 2 1 0 5 3 2 3 2 2 2 2 1 4 3 0 2 3 2 4 6 3 4 5 2 7 4 6 4 3 1 3 2 4 4 2 1 5 3 2 2 4 4 3 3 5 3 6 1 3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 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 
];
B = [
0 0 0
 1605 1097 508
 1827 1349 478
 1661 1249 412
 1876 1409 467
 1946 1639 307
 1416 1169 247
 2042 1738 304
 1633 1408 225
 1357 1176 181
 2402 2213 189
 1163 993 170
 1491 1363 128
 1059 940 119
 1182 980 202
 1329 1242 87
 952 836 116
 732 623 109
 632 565 67
 826 739 87
 1548 1464 84
 1554 1433 121
 1247 1172 75
 2092 1998 94
 1292 1220 72
 2502 2400 102
 1917 1809 108
 2035 1858 177
 2133 2063 70
 1776 1639 137
 2422 2299 123
 2090 1922 168
 2039 1895 144
 2593 2427 166
 3312 2965 347
 2269 2164 105
 3307 3131 176
 7132 5894 1238
 2800 2678 122
 3832 3556 276
 6124 5187 937
 3996 3838 158
 5263 4829 434
 3113 3008 105
 3673 3539 134
 5351 5023 328
 4195 4094 101
 5172 4885 287
 4071 3962 109
 5521 5272 249
 3639 3545 94
 6188 5971 217
 5229 5107 122
 5482 5272 210
 4623 4518 105
 5713 5478 235
 6253 6074 179
 4667 4575 92
 7263 7079 184
 2287 2227 60
 145212 137936 7276
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 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 6 0 1
0 1 0 0
0 0 0 0
1 1 1 0
0 1 0 0
0 1 1 0
3 0 1 2
13 0 1 2
529 0 1 2
3121 0 2 1
13353 1 1 2
105382 2 6 17
60119 11 11 13
24979 6 8 8
30513 6 16 17
28974 12 16 7
16285 21 18 19
7322 21 16 18
3277 31 25 20
1137 27 25 21
416 39 21 23
173 32 22 21
55 31 20 24
23 42 25 33
20 38 32 30
22 29 31 30
16 37 19 11
13 40 16 22
11 29 13 12
12 14 15 12
13 24 5 9
9 6 3 4
9 9 6 5
7 10 6 4
2 8 8 5
7 5 9 7
9 9 10 13
12 13 13 7
13 14 17 8
15 15 20 26
25 9 29 19
24 20 15 18
21 35 25 25
38 25 26 25
32 33 28 32
24 38 33 29
26 28 32 25
31 32 41 36
35 34 29 24
29 24 30 27
19 28 19 21
15 20 18 21
15 23 21 17
14 11 14 13
9 9 12 11
6 13 7 8
9 5 6 3
6 5 5 8
3 4 5 6
8 5 7 5
3 2 7 6
7 8 5 1
3 6 10 9
3 5 12 4
9 7 7 9
4 4 6 4
7 11 11 10
32 14 15 6
7 13 13 8
16 11 11 9
9 9 15 11
14 8 19 21
12 17 20 20
25 23 23 11
26 36 23 18
24 21 20 22
20 31 23 28
23 25 23 19
26 29 20 21
23 19 14 15
8 6 10 13
4 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
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 
];
