Skip to content

Instantly share code, notes, and snippets.

@kylemcdonald
Last active June 4, 2023 11:16
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kylemcdonald/8c03de4ae1928ab5f3d203245549e802 to your computer and use it in GitHub Desktop.
Save kylemcdonald/8c03de4ae1928ab5f3d203245549e802 to your computer and use it in GitHub Desktop.
Long Run Gray Codes for 2-bits through 13-bits.
// Generated using code from https://stackoverflow.com/a/66555635/940196
// More info on LRGC http://emis.impa.br/EMIS/journals/EJC/Volume_10/PDF/v10i1r27.pdf
const int lrgc_2[4] = int[](0,1,3,2);
const int lrgc_3[8] = int[](0,1,3,2,6,7,5,4);
const int lrgc_4[16] = int[](0,1,3,7,15,11,9,8,12,13,5,4,6,14,10,2);
const int lrgc_5[32] = int[](0,1,3,7,15,31,29,25,17,16,18,2,10,14,12,28,20,21,23,19,27,11,9,13,5,4,6,22,30,26,24,8);
const int lrgc_6[64] = int[](0,1,3,7,15,31,63,62,58,42,40,32,36,37,5,21,17,25,27,11,10,14,46,38,54,50,48,49,33,41,9,13,29,28,30,26,18,2,34,35,39,55,53,61,57,56,24,8,12,4,6,22,23,19,51,59,43,47,45,44,60,52,20,16);
const int lrgc_7[128] = int[](0,32,33,35,39,103,111,127,125,93,89,81,80,16,18,2,10,42,46,44,60,124,116,117,119,87,83,91,75,11,9,13,5,37,36,38,54,118,126,122,120,88,72,64,65,1,3,7,15,47,63,61,57,121,113,112,114,82,66,74,78,14,12,28,20,52,53,55,51,115,123,107,105,73,77,69,68,4,6,22,30,62,58,56,40,104,96,97,99,67,71,79,95,31,29,25,17,49,48,50,34,98,106,110,108,76,92,84,85,21,23,19,27,59,43,41,45,109,101,100,102,70,86,94,90,26,24,8);
const int lrgc_8[256] = int[](0,32,33,97,99,103,71,79,95,223,221,253,249,241,177,176,178,146,130,2,10,14,46,44,60,124,116,84,85,87,215,211,219,251,235,171,169,173,141,133,132,4,6,38,54,62,126,122,120,88,72,200,192,193,225,227,231,167,175,143,159,157,29,25,17,49,48,112,114,98,66,74,78,206,204,236,252,244,180,181,183,151,147,19,27,11,43,41,45,109,101,69,68,70,198,214,222,254,250,186,184,168,136,128,129,1,3,35,39,47,111,127,125,93,89,217,209,208,240,242,226,162,170,138,142,140,12,28,20,52,53,117,119,115,83,91,75,203,201,233,237,229,165,164,166,134,150,22,30,26,58,56,40,104,96,64,65,67,195,199,207,239,255,191,189,185,153,145,144,16,18,50,34,42,106,110,108,76,92,220,212,213,245,247,243,179,187,155,139,137,9,13,5,37,36,100,102,118,86,94,90,218,216,248,232,224,160,161,163,131,135,7,15,31,63,61,57,121,113,81,80,82,210,194,202,234,238,174,172,188,156,148,149,21,23,55,51,59,123,107,105,73,77,205,197,196,228,230,246,182,190,158,154,152,24,8);
const int lrgc_9[512] = int[](0,128,160,161,163,419,423,487,495,367,383,381,349,93,89,81,80,208,144,146,130,386,394,426,430,302,300,316,380,124,116,117,119,247,215,211,219,475,459,395,393,265,269,261,293,37,36,38,54,182,246,254,250,506,504,472,456,328,320,321,257,1,3,7,15,143,175,191,189,445,441,505,497,369,368,370,338,82,66,74,78,206,142,140,156,412,404,436,437,309,311,307,371,115,123,107,105,233,201,205,197,453,452,388,390,262,278,286,318,62,58,56,40,168,232,224,225,481,483,451,455,327,335,351,287,31,29,25,17,145,177,176,178,434,418,482,490,362,366,364,332,76,92,84,85,213,149,151,147,403,411,443,427,299,297,301,365,109,101,100,102,230,198,214,222,478,474,410,408,280,264,256,288,32,33,35,39,167,231,239,255,511,509,477,473,345,337,336,272,16,18,2,10,138,170,174,172,428,444,508,500,372,373,375,343,87,83,91,75,203,139,137,141,397,389,421,420,292,294,310,374,118,126,122,120,248,216,200,192,448,449,385,387,259,263,271,303,47,63,61,57,185,249,241,240,496,498,466,450,322,330,334,270,14,12,28,20,148,180,181,183,439,435,499,507,379,363,361,329,73,77,69,68,196,132,134,150,406,414,446,442,314,312,296,360,104,96,97,99,227,195,199,207,463,479,415,413,285,281,273,305,49,48,50,34,162,226,234,238,494,492,460,476,348,340,341,277,21,23,19,27,155,187,171,169,425,429,493,485,357,356,358,326,70,86,94,90,218,154,152,136,392,384,416,417,289,291,295,359,103,111,127,125,253,221,217,209,465,464,400,402,274,258,266,298,42,46,44,60,188,252,244,245,501,503,471,467,339,347,331,267,11,9,13,5,133,165,164,166,422,438,502,510,382,378,376,344,88,72,64,65,193,129,131,135,391,399,431,447,319,317,313,377,121,113,112,114,242,210,194,202,458,462,398,396,268,284,276,308,52,53,55,51,179,243,251,235,491,489,457,461,333,325,324,260,4,6,22,30,158,190,186,184,440,424,488,480,352,353,355,323,67,71,79,95,223,159,157,153,409,401,433,432,304,306,290,354,98,106,110,108,236,204,220,212,468,469,405,407,279,275,283,315,59,43,41,45,173,237,229,228,484,486,454,470,342,350,346,282,26,24,8);
const int lrgc_10[1024] = int[](0,1,257,273,337,339,343,855,983,982,990,1022,958,702,698,682,554,552,544,512,576,577,581,597,725,727,735,767,703,191,187,171,43,42,34,2,66,64,68,84,212,213,221,253,189,445,441,425,297,299,291,259,323,322,326,342,470,468,476,508,444,956,952,936,808,809,553,521,585,587,579,595,723,722,726,758,694,182,190,174,46,44,40,8,72,73,65,81,209,211,215,247,183,439,447,431,303,302,298,266,330,328,320,336,464,465,469,501,437,949,957,941,813,815,811,779,843,842,834,850,978,976,980,1012,948,692,700,684,556,557,45,13,77,79,75,91,219,218,210,242,178,434,438,422,294,292,300,268,332,333,329,345,473,475,467,499,435,947,951,935,807,806,814,782,846,844,840,856,984,985,977,1009,945,689,693,677,549,551,559,527,591,590,586,602,730,728,720,752,688,176,180,164,36,37,293,261,325,327,335,351,479,478,474,506,442,954,946,930,802,800,804,772,836,837,845,861,989,991,987,1019,955,699,691,675,547,546,550,518,582,580,588,604,732,733,729,761,697,185,177,161,33,35,39,7,71,70,78,94,222,220,216,248,184,440,432,416,288,289,801,769,833,835,839,583,711,710,718,734,670,158,154,186,58,56,48,32,96,97,101,69,197,199,207,223,159,415,411,443,315,314,306,290,354,352,356,324,452,453,461,477,413,925,921,953,825,827,819,803,867,866,870,838,966,964,972,988,924,668,664,696,568,569,57,41,105,107,99,67,195,194,198,214,150,406,414,446,318,316,312,296,360,361,353,321,449,451,455,471,407,919,927,959,831,830,826,810,874,872,864,832,960,961,965,981,917,661,669,701,573,575,571,555,619,618,610,578,706,704,708,724,660,148,156,188,60,61,317,301,365,367,363,331,459,458,450,466,402,914,918,950,822,820,828,812,876,877,873,841,969,971,963,979,915,659,663,695,567,566,574,558,622,620,616,584,712,713,705,721,657,145,149,181,53,55,63,47,111,110,106,74,202,200,192,208,144,400,404,436,308,309,821,805,869,871,879,847,975,974,970,986,922,666,658,690,562,560,564,548,612,613,621,589,717,719,715,731,667,155,147,179,51,50,54,38,102,100,108,76,204,205,201,217,153,409,401,433,305,307,311,295,359,358,366,334,462,460,456,472,408,920,912,944,816,817,561,545,609,611,615,103,231,230,238,206,142,398,394,410,282,280,272,304,368,369,373,357,485,487,495,463,399,911,907,923,795,794,786,818,882,880,884,868,996,997,1005,973,909,653,649,665,537,539,531,563,627,626,630,614,742,740,748,716,652,140,136,152,24,25,281,313,377,379,371,355,483,482,486,454,390,902,910,926,798,796,792,824,888,889,881,865,993,995,999,967,903,647,655,671,543,542,538,570,634,632,624,608,736,737,741,709,645,133,141,157,29,31,27,59,123,122,114,98,226,224,228,196,132,388,396,412,284,285,797,829,893,895,891,875,1003,1002,994,962,898,642,646,662,534,532,540,572,636,637,633,617,745,747,739,707,643,131,135,151,23,22,30,62,126,124,120,104,232,233,225,193,129,385,389,405,277,279,287,319,383,382,378,362,490,488,480,448,384,896,900,916,788,789,533,565,629,631,639,623,751,750,746,714,650,138,130,146,18,16,20,52,116,117,125,109,237,239,235,203,139,395,387,403,275,274,278,310,374,372,380,364,492,493,489,457,393,905,897,913,785,787,791,823,887,886,894,878,1006,1004,1000,968,904,648,640,656,528,529,17,49,113,115,119,375,503,502,510,494,430,942,938,906,778,776,768,784,848,849,853,885,1013,1015,1023,1007,943,687,683,651,523,522,514,530,594,592,596,628,756,757,765,749,685,173,169,137,9,11,3,19,83,82,86,118,246,244,252,236,172,428,424,392,264,265,777,793,857,859,851,883,1011,1010,1014,998,934,678,686,654,526,524,520,536,600,601,593,625,753,755,759,743,679,167,175,143,15,14,10,26,90,88,80,112,240,241,245,229,165,421,429,397,269,271,267,283,347,346,338,370,498,496,500,484,420,932,940,908,780,781,525,541,605,607,603,635,763,762,754,738,674,162,166,134,6,4,12,28,92,93,89,121,249,251,243,227,163,419,423,391,263,262,270,286,350,348,344,376,504,505,497,481,417,929,933,901,773,775,783,799,863,862,858,890,1018,1016,1008,992,928,672,676,644,516,517,5,21,85,87,95,127,255,254,250,234,170,426,418,386,258,256,260,276,340,341,349,381,509,511,507,491,427,939,931,899,771,770,774,790,854,852,860,892,1020,1021,1017,1001,937,681,673,641,513,515,519,535,599,598,606,638,766,764,760,744,680,168,160,128);
const int lrgc_11[2048] = int[](0,512,640,672,673,1697,1699,1955,1959,1447,1511,1519,1391,367,383,381,349,861,605,601,593,1617,1616,1744,1680,1168,1170,1154,1410,386,394,426,430,942,814,812,828,1852,1916,1660,1652,1140,1141,1143,1271,247,215,211,219,731,987,971,907,1931,1929,1801,1805,1293,1285,1317,1061,37,36,38,54,566,694,758,766,1790,1786,2042,2040,1528,1496,1480,1352,328,320,321,257,769,513,515,519,1543,1551,1679,1711,1199,1215,1213,1469,445,441,505,497,1009,881,880,882,1906,1874,1618,1602,1090,1098,1102,1230,206,142,140,156,668,924,916,948,1972,1973,1845,1847,1335,1331,1395,1139,115,123,107,105,617,745,713,717,1741,1733,1989,1988,1476,1412,1414,1286,262,278,286,318,830,574,570,568,1592,1576,1704,1768,1256,1248,1249,1505,481,483,451,455,967,839,847,863,1887,1823,1567,1565,1053,1049,1041,1169,145,177,176,178,690,946,930,994,2018,2026,1898,1902,1390,1388,1356,1100,76,92,84,85,597,725,661,663,1687,1683,1939,1947,1435,1467,1451,1323,299,297,301,365,877,621,613,612,1636,1638,1766,1734,1222,1238,1246,1502,478,474,410,408,920,792,776,768,1792,1824,1568,1569,1057,1059,1063,1191,167,231,239,255,767,1023,1021,989,2013,2009,1881,1873,1361,1360,1296,1040,16,18,2,10,522,650,682,686,1710,1708,1964,1980,1468,1532,1524,1396,372,373,375,343,855,599,595,603,1627,1611,1739,1675,1163,1161,1165,1421,397,389,421,420,932,804,806,822,1846,1910,1654,1662,1150,1146,1144,1272,248,216,200,192,704,960,961,897,1921,1923,1795,1799,1287,1295,1327,1071,47,63,61,57,569,697,761,753,1777,1776,2032,2034,1522,1490,1474,1346,322,330,334,270,782,526,524,540,1564,1556,1684,1716,1204,1205,1207,1463,439,435,499,507,1019,891,875,873,1897,1865,1609,1613,1101,1093,1092,1220,196,132,134,150,662,918,926,958,1982,1978,1850,1848,1336,1320,1384,1128,104,96,97,99,611,739,707,711,1735,1743,1999,2015,1503,1439,1437,1309,285,281,273,305,817,561,560,562,1586,1570,1698,1762,1250,1258,1262,1518,494,492,460,476,988,860,852,853,1877,1813,1557,1559,1047,1043,1051,1179,155,187,171,169,681,937,941,1005,2029,2021,1893,1892,1380,1382,1350,1094,70,86,94,90,602,730,666,664,1688,1672,1928,1920,1408,1440,1441,1313,289,291,295,359,871,615,623,639,1663,1661,1789,1757,1245,1241,1233,1489,465,464,400,402,914,786,770,778,1802,1834,1578,1582,1070,1068,1084,1212,188,252,244,245,757,1013,1015,983,2007,2003,1875,1883,1371,1355,1291,1035,11,9,13,5,517,645,677,676,1700,1702,1958,1974,1462,1526,1534,1406,382,378,376,344,856,600,584,576,1600,1601,1729,1665,1153,1155,1159,1415,391,399,431,447,959,831,829,825,1849,1913,1657,1649,1137,1136,1138,1266,242,210,194,202,714,970,974,910,1934,1932,1804,1820,1308,1300,1332,1076,52,53,55,51,563,691,755,763,1787,1771,2027,2025,1513,1481,1485,1357,333,325,324,260,772,516,518,534,1558,1566,1694,1726,1214,1210,1208,1464,440,424,488,480,992,864,865,867,1891,1859,1603,1607,1095,1103,1119,1247,223,159,157,153,665,921,913,945,1969,1968,1840,1842,1330,1314,1378,1122,98,106,110,108,620,748,716,732,1756,1748,2004,2005,1493,1429,1431,1303,279,275,283,315,827,571,555,553,1577,1581,1709,1773,1261,1253,1252,1508,484,486,454,470,982,854,862,858,1882,1818,1562,1560,1048,1032,1024,1152,128,160,161,163,675,931,935,999,2023,2031,1903,1919,1407,1405,1373,1117,93,89,81,80,592,720,656,658,1682,1666,1922,1930,1418,1450,1454,1326,302,300,316,380,892,636,628,629,1653,1655,1783,1751,1239,1235,1243,1499,475,459,395,393,905,777,781,773,1797,1829,1573,1572,1060,1062,1078,1206,182,246,254,250,762,1018,1016,984,2008,1992,1864,1856,1344,1345,1281,1025,1,3,7,15,527,655,687,703,1727,1725,1981,1977,1465,1529,1521,1393,369,368,370,338,850,594,578,586,1610,1614,1742,1678,1166,1164,1180,1436,412,404,436,437,949,821,823,819,1843,1907,1651,1659,1147,1131,1129,1257,233,201,205,197,709,965,964,900,1924,1926,1798,1814,1302,1310,1342,1086,62,58,56,40,552,680,744,736,1760,1761,2017,2019,1507,1475,1479,1351,327,335,351,287,799,543,541,537,1561,1553,1681,1713,1201,1200,1202,1458,434,418,482,490,1002,874,878,876,1900,1868,1612,1628,1116,1108,1109,1237,213,149,151,147,659,915,923,955,1979,1963,1835,1833,1321,1325,1389,1133,109,101,100,102,614,742,710,726,1750,1758,2014,2010,1498,1434,1432,1304,280,264,256,288,800,544,545,547,1571,1575,1703,1767,1255,1263,1279,1535,511,509,477,473,985,857,849,848,1872,1808,1552,1554,1042,1026,1034,1162,138,170,174,172,684,940,956,1020,2044,2036,1908,1909,1397,1399,1367,1111,87,83,91,75,587,715,651,649,1673,1677,1933,1925,1413,1445,1444,1316,292,294,310,374,886,630,638,634,1658,1656,1784,1752,1240,1224,1216,1472,448,449,385,387,899,771,775,783,1807,1839,1583,1599,1087,1085,1081,1209,185,249,241,240,752,1008,1010,978,2002,1986,1858,1866,1354,1358,1294,1038,14,12,28,20,532,660,692,693,1717,1719,1975,1971,1459,1523,1531,1403,379,363,361,329,841,585,589,581,1605,1604,1732,1668,1156,1158,1174,1430,406,414,446,442,954,826,824,808,1832,1896,1640,1632,1120,1121,1123,1251,227,195,199,207,719,975,991,927,1951,1949,1821,1817,1305,1297,1329,1073,49,48,50,34,546,674,738,746,1770,1774,2030,2028,1516,1484,1500,1372,348,340,341,277,789,533,535,531,1555,1563,1691,1723,1211,1195,1193,1449,425,429,493,485,997,869,868,870,1894,1862,1606,1622,1110,1118,1114,1242,218,154,152,136,648,904,896,928,1952,1953,1825,1827,1315,1319,1383,1127,103,111,127,125,637,765,733,729,1753,1745,2001,2000,1488,1424,1426,1298,274,258,266,298,810,554,558,556,1580,1596,1724,1788,1276,1268,1269,1525,501,503,471,467,979,851,859,843,1867,1803,1547,1545,1033,1037,1029,1157,133,165,164,166,678,934,950,1014,2038,2046,1918,1914,1402,1400,1368,1112,88,72,64,65,577,705,641,643,1667,1671,1927,1935,1423,1455,1471,1343,319,317,313,377,889,633,625,624,1648,1650,1778,1746,1234,1218,1226,1482,458,462,398,396,908,780,796,788,1812,1844,1588,1589,1077,1079,1075,1203,179,243,251,235,747,1003,1001,969,1993,1997,1869,1861,1349,1348,1284,1028,4,6,22,30,542,670,702,698,1722,1720,1976,1960,1448,1512,1504,1376,352,353,355,323,835,579,583,591,1615,1631,1759,1695,1183,1181,1177,1433,409,401,433,432,944,816,818,802,1826,1890,1634,1642,1130,1134,1132,1260,236,204,220,212,724,980,981,917,1941,1943,1815,1811,1299,1307,1339,1083,59,43,41,45,557,685,749,741,1765,1764,2020,2022,1510,1478,1494,1366,342,350,346,282,794,538,536,520,1544,1536,1664,1696,1184,1185,1187,1443,419,423,487,495,1007,879,895,893,1917,1885,1629,1625,1113,1105,1104,1232,208,144,146,130,642,898,906,938,1962,1966,1838,1836,1324,1340,1404,1148,124,116,117,119,631,759,727,723,1747,1755,2011,1995,1483,1419,1417,1289,265,269,261,293,805,549,548,550,1574,1590,1718,1782,1270,1278,1274,1530,506,504,472,456,968,840,832,833,1857,1793,1537,1539,1027,1031,1039,1167,143,175,191,189,701,957,953,1017,2041,2033,1905,1904,1392,1394,1362,1106,82,66,74,78,590,718,654,652,1676,1692,1948,1940,1428,1460,1461,1333,309,311,307,371,883,627,635,619,1643,1641,1769,1737,1225,1229,1221,1477,453,452,388,390,902,774,790,798,1822,1854,1598,1594,1082,1080,1064,1192,168,232,224,225,737,993,995,963,1987,1991,1863,1871,1359,1375,1311,1055,31,29,25,17,529,657,689,688,1712,1714,1970,1954,1442,1506,1514,1386,362,366,364,332,844,588,604,596,1620,1621,1749,1685,1173,1175,1171,1427,403,411,443,427,939,811,809,813,1837,1901,1645,1637,1125,1124,1126,1254,230,198,214,222,734,990,986,922,1946,1944,1816,1800,1288,1280,1312,1056,32,33,35,39,551,679,743,751,1775,1791,2047,2045,1533,1501,1497,1369,345,337,336,272,784,528,530,514,1538,1546,1674,1706,1194,1198,1196,1452,428,444,508,500,1012,884,885,887,1911,1879,1623,1619,1107,1115,1099,1227,203,139,137,141,653,909,901,933,1957,1956,1828,1830,1318,1334,1398,1142,118,126,122,120,632,760,728,712,1736,1728,1984,1985,1473,1409,1411,1283,259,263,271,303,815,559,575,573,1597,1593,1721,1785,1273,1265,1264,1520,496,498,466,450,962,834,842,846,1870,1806,1550,1548,1036,1052,1044,1172,148,180,181,183,695,951,947,1011,2035,2043,1915,1899,1387,1385,1353,1097,73,77,69,68,580,708,644,646,1670,1686,1942,1950,1438,1470,1466,1338,314,312,296,360,872,616,608,609,1633,1635,1763,1731,1219,1223,1231,1487,463,479,415,413,925,797,793,785,1809,1841,1585,1584,1072,1074,1058,1186,162,226,234,238,750,1006,1004,972,1996,2012,1884,1876,1364,1365,1301,1045,21,23,19,27,539,667,699,683,1707,1705,1961,1965,1453,1517,1509,1381,357,356,358,326,838,582,598,606,1630,1626,1754,1690,1178,1176,1160,1416,392,384,416,417,929,801,803,807,1831,1895,1639,1647,1135,1151,1149,1277,253,221,217,209,721,977,976,912,1936,1938,1810,1794,1282,1290,1322,1066,42,46,44,60,572,700,764,756,1780,1781,2037,2039,1527,1495,1491,1363,339,347,331,267,779,523,521,525,1549,1541,1669,1701,1189,1188,1190,1446,422,438,502,510,1022,894,890,888,1912,1880,1624,1608,1096,1088,1089,1217,193,129,131,135,647,903,911,943,1967,1983,1855,1853,1341,1337,1401,1145,121,113,112,114,626,754,722,706,1730,1738,1994,1998,1486,1422,1420,1292,268,284,276,308,820,564,565,567,1591,1587,1715,1779,1267,1275,1259,1515,491,489,457,461,973,845,837,836,1860,1796,1540,1542,1030,1046,1054,1182,158,190,186,184,696,952,936,1000,2024,2016,1888,1889,1377,1379,1347,1091,67,71,79,95,607,735,671,669,1693,1689,1945,1937,1425,1457,1456,1328,304,306,290,354,866,610,618,622,1646,1644,1772,1740,1228,1244,1236,1492,468,469,405,407,919,791,787,795,1819,1851,1595,1579,1067,1065,1069,1197,173,237,229,228,740,996,998,966,1990,2006,1878,1886,1374,1370,1306,1050,26,24,8);
const int lrgc_12[4096] = int[](0,128,160,416,417,929,931,1955,1959,4007,4071,3815,3823,3311,3327,2303,2301,2269,2141,2137,2393,2385,337,336,1360,1296,1808,1810,1554,1538,3586,3594,3626,2602,2606,2734,2732,2988,3004,2492,2556,3580,3572,1524,1525,1269,1271,1783,1751,1747,723,731,603,587,843,779,2827,2825,3849,3853,3341,3333,3077,3109,3108,1060,1062,38,54,182,246,502,510,1022,1018,2042,2040,4088,4056,3800,3784,3776,3264,3265,2241,2177,2049,2051,2307,2311,263,271,1295,1327,1839,1855,1853,1597,1593,3641,3705,2681,2673,2801,2800,3056,3058,2546,2514,3538,3522,1474,1482,1486,1230,1166,1678,1676,652,668,540,532,788,820,2868,2869,3893,3895,3891,3379,3443,3187,3195,1147,1131,107,105,233,201,457,461,973,965,1989,1988,1924,3972,3974,3718,3734,3222,3230,2206,2238,2110,2106,2362,2360,312,296,360,1384,1376,1888,1889,1633,1635,3683,3651,2627,2631,2759,2767,3023,3039,2527,2463,2461,3485,3481,1433,1425,1169,1201,1713,1712,688,690,562,546,802,866,874,2922,2926,3950,3948,3436,3404,3148,3164,1116,1108,84,85,213,149,405,407,403,915,923,1947,1979,4027,4011,3755,3753,3241,3245,2221,2285,2157,2149,2148,2404,2406,358,326,1350,1366,1878,1886,1630,1626,3674,3610,2586,2584,2712,2696,2688,2944,2976,2464,2465,3489,3491,1443,1447,1191,1255,1767,1775,751,767,765,637,605,861,857,2905,2897,3921,3920,3408,3344,3088,3090,1042,1026,2,10,42,170,174,430,428,940,956,1980,2044,4092,4084,3828,3829,3317,3319,3287,2263,2259,2131,2139,2395,2379,331,267,1291,1289,1801,1805,1549,1541,3589,3621,3620,2596,2598,2726,2742,2998,3062,2550,2558,3582,3578,1530,1528,1272,1240,1224,1736,1728,704,705,577,513,769,771,2819,2823,3847,3855,3343,3375,3119,3135,3133,1085,1081,57,121,249,241,497,496,1008,1010,2034,2002,4050,4034,4042,3786,3790,3278,3214,2190,2188,2060,2076,2332,2324,276,308,1332,1333,1845,1847,1843,1587,1651,3699,3707,2683,2667,2795,2793,3049,3017,2505,2509,3533,3525,3524,1476,1412,1156,1158,1670,1686,662,670,542,574,830,826,2874,2872,3896,3880,3944,3432,3424,3168,3169,1121,1123,99,67,195,199,455,463,975,991,927,1951,1949,3997,3993,3737,3729,3217,3249,2225,2224,2096,2098,2354,2338,290,354,362,1386,1390,1902,1900,1644,1612,3660,3676,2652,2644,2772,2773,3029,2965,2967,2455,2451,3475,3483,1435,1467,1211,1195,1707,1705,681,685,557,621,877,869,868,2916,2918,3942,3910,3398,3414,3158,3166,1118,1114,90,26,154,152,136,392,384,896,928,1952,1953,4001,4003,3747,3751,3239,3303,2279,2287,2159,2175,2173,2429,2397,349,345,1369,1361,1873,1872,1616,1552,3600,3602,2578,2562,2570,2698,2730,2986,2990,2478,2476,3500,3516,1468,1532,1276,1268,1780,1781,757,759,727,599,595,851,859,2907,2891,3915,3851,3339,3337,3081,3085,1037,1029,1061,37,36,164,166,422,438,950,1014,2038,2046,4094,4090,3834,3832,3320,3288,3272,2248,2240,2112,2113,2369,2305,257,259,1283,1287,1799,1807,1551,1583,1599,3647,3645,2621,2617,2745,2809,3065,3057,2545,2544,3568,3570,1522,1490,1234,1218,1226,1738,1742,718,654,526,524,780,796,2844,2836,3860,3892,3380,3381,3383,3127,3123,1075,1139,115,123,251,235,491,489,1001,969,1993,1997,4045,4037,4036,3780,3716,3204,3206,2182,2198,2070,2078,2334,2366,318,314,1338,1336,1320,1832,1896,1640,1632,3680,3681,2657,2659,2787,2755,3011,3015,2503,2511,3535,3551,3487,1439,1437,1181,1177,1689,1681,657,689,561,560,816,818,2866,2850,2914,3938,3946,3434,3438,3182,3180,1132,1100,76,92,220,212,468,469,981,917,919,1943,1939,3987,3995,3739,3771,3259,3243,2219,2217,2089,2093,2349,2413,2405,357,356,1380,1382,1894,1862,1606,1622,3670,3678,2654,2650,2778,2714,2970,2968,2952,2440,2432,3456,3488,1440,1441,1185,1187,1699,1703,679,743,615,623,639,895,893,2941,2909,3933,3929,3417,3409,3153,3152,1104,1040,16,18,146,130,138,394,426,938,942,1966,1964,4012,4028,3772,3836,3324,3316,2292,2293,2295,2167,2135,2391,2387,339,347,1371,1355,1867,1803,1547,1545,3593,3597,2573,2565,2597,2725,2724,2980,2982,2470,2486,3510,3574,1526,1534,1278,1274,1786,1784,1752,728,712,584,576,832,833,2881,2817,3841,3843,3331,3335,3079,3087,1039,1071,1087,63,61,189,185,441,505,1017,1009,2033,2032,4080,4082,3826,3794,3778,3266,3274,2250,2254,2126,2062,2318,2316,268,284,1308,1300,1812,1844,1588,1589,1591,3639,3635,2611,2675,2803,2811,3067,3051,2539,2537,3561,3529,1481,1485,1477,1221,1220,1732,1668,644,646,518,534,790,798,2846,2878,3902,3898,3386,3384,3368,3112,3176,1128,1120,96,97,225,227,483,451,963,967,1991,1999,2015,4063,3999,3743,3741,3229,3225,2201,2193,2065,2097,2353,2352,304,306,1330,1314,1378,1890,1898,1642,1646,3694,3692,2668,2636,2764,2780,3036,3028,2516,2517,2453,3477,3479,1431,1427,1171,1179,1691,1723,699,683,555,553,809,813,2861,2925,2917,3941,3940,3428,3430,3174,3142,1094,1110,86,94,222,218,474,410,408,920,904,1928,1920,3968,4000,3744,3745,3233,3235,2211,2215,2087,2151,2407,2415,2431,383,381,1405,1373,1885,1881,1625,1617,3665,3664,2640,2576,2704,2706,2690,2946,2954,2442,2474,3498,3502,1454,1452,1196,1212,1724,1788,764,756,628,629,631,887,855,2903,2899,3923,3931,3419,3403,3147,3083,1035,1033,9,13,5,133,165,421,420,932,934,1958,1974,4022,4086,3830,3838,3326,3322,2298,2296,2264,2136,2120,2376,2368,320,321,1345,1281,1793,1795,1539,1543,3591,3599,3631,2607,2623,2751,2749,3005,3001,2489,2553,3577,3569,1521,1520,1264,1266,1778,1746,1730,706,714,586,590,846,782,2830,2828,3852,3868,3356,3348,3092,3124,3125,1077,1079,55,51,179,243,499,507,1019,1003,2027,2025,4073,4041,3785,3789,3781,3269,3268,2244,2180,2052,2054,2310,2326,278,286,1310,1342,1854,1850,1848,1592,1576,3624,3688,2664,2656,2784,2785,3041,3043,2531,2499,3523,3527,1479,1487,1503,1247,1183,1695,1693,669,665,537,529,785,817,2865,2864,3888,3890,3874,3362,3426,3170,3178,1130,1134,110,108,236,204,460,476,988,980,2004,2005,1941,3989,3991,3735,3731,3219,3227,2203,2235,2107,2091,2347,2345,297,301,365,1389,1381,1893,1892,1636,1638,3686,3654,2630,2646,2774,2782,3038,3034,2522,2458,2456,3480,3464,1416,1408,1152,1184,1696,1697,673,675,547,551,807,871,879,2927,2943,3967,3965,3453,3421,3165,3161,1113,1105,81,80,208,144,400,402,386,898,906,1930,1962,4010,4014,3758,3756,3244,3260,2236,2300,2172,2164,2165,2421,2423,375,343,1367,1363,1875,1883,1627,1611,3659,3595,2571,2569,2697,2701,2693,2949,2981,2469,2468,3492,3494,1446,1462,1206,1270,1782,1790,766,762,760,632,600,856,840,2888,2880,3904,3905,3393,3329,3073,3075,1027,1031,7,15,47,175,191,447,445,957,953,1977,2041,4089,4081,3825,3824,3312,3314,3282,2258,2242,2114,2122,2378,2382,334,270,1294,1292,1804,1820,1564,1556,3604,3636,3637,2613,2615,2743,2739,2995,3059,2547,2555,3579,3563,1515,1513,1257,1225,1229,1741,1733,709,708,580,516,772,774,2822,2838,3862,3870,3358,3390,3134,3130,3128,1080,1064,40,104,232,224,480,481,993,995,2019,1987,4035,4039,4047,3791,3807,3295,3231,2207,2205,2077,2073,2329,2321,273,305,1329,1328,1840,1842,1826,1570,1634,3682,3690,2666,2670,2798,2796,3052,3020,2508,2524,3548,3540,3541,1493,1429,1173,1175,1687,1683,659,667,539,571,827,811,2859,2857,3881,3885,3949,3437,3429,3173,3172,1124,1126,102,70,198,214,470,478,990,986,922,1946,1944,3992,3976,3720,3712,3200,3232,2208,2209,2081,2083,2339,2343,295,359,367,1391,1407,1919,1917,1661,1629,3677,3673,2649,2641,2769,2768,3024,2960,2962,2450,2434,3458,3466,1418,1450,1194,1198,1710,1708,684,700,572,636,892,884,885,2933,2935,3959,3927,3415,3411,3155,3163,1115,1099,75,11,139,137,141,397,389,901,933,1957,1956,4004,4006,3750,3766,3254,3318,2294,2302,2174,2170,2168,2424,2392,344,328,1352,1344,1856,1857,1601,1537,3585,3587,2563,2567,2575,2703,2735,2991,3007,2495,2493,3517,3513,1465,1529,1273,1265,1777,1776,752,754,722,594,578,834,842,2890,2894,3918,3854,3342,3340,3084,3100,1052,1044,1076,52,53,181,183,439,435,947,1011,2035,2043,4091,4075,3819,3817,3305,3273,3277,2253,2245,2117,2116,2372,2308,260,262,1286,1302,1814,1822,1566,1598,1594,3642,3640,2616,2600,2728,2792,3048,3040,2528,2529,3553,3555,1507,1475,1219,1223,1231,1743,1759,735,671,543,541,797,793,2841,2833,3857,3889,3377,3376,3378,3122,3106,1058,1122,98,106,234,238,494,492,1004,972,1996,2012,4060,4052,4053,3797,3733,3221,3223,2199,2195,2067,2075,2331,2363,315,299,1323,1321,1325,1837,1901,1645,1637,3685,3684,2660,2662,2790,2758,3014,3030,2518,2526,3550,3546,3482,1434,1432,1176,1160,1672,1664,640,672,544,545,801,803,2851,2855,2919,3943,3951,3439,3455,3199,3197,1149,1117,93,89,217,209,465,464,976,912,914,1938,1922,3970,3978,3722,3754,3242,3246,2222,2220,2092,2108,2364,2428,2420,372,373,1397,1399,1911,1879,1623,1619,3667,3675,2651,2635,2763,2699,2955,2953,2957,2445,2437,3461,3493,1445,1444,1188,1190,1702,1718,694,758,630,638,634,890,888,2936,2904,3928,3912,3400,3392,3136,3137,1089,1025,1,3,131,135,143,399,431,943,959,1983,1981,4029,4025,3769,3833,3321,3313,2289,2288,2290,2162,2130,2386,2370,322,330,1354,1358,1870,1806,1550,1548,3596,3612,2588,2580,2612,2740,2741,2997,2999,2487,2483,3507,3571,1523,1531,1275,1259,1771,1769,1737,713,717,589,581,837,836,2884,2820,3844,3846,3334,3350,3094,3102,1054,1086,1082,58,56,184,168,424,488,1000,992,2016,2017,4065,4067,3811,3779,3783,3271,3279,2255,2271,2143,2079,2335,2333,285,281,1305,1297,1809,1841,1585,1584,1586,3634,3618,2594,2658,2786,2794,3050,3054,2542,2540,3564,3532,1484,1500,1492,1236,1237,1749,1685,661,663,535,531,787,795,2843,2875,3899,3883,3371,3369,3373,3117,3181,1133,1125,101,100,228,230,486,454,966,982,2006,2014,2010,4058,3994,3738,3736,3224,3208,2184,2176,2048,2080,2336,2337,289,291,1315,1319,1383,1895,1903,1647,1663,3711,3709,2685,2653,2781,2777,3033,3025,2513,2512,2448,3472,3474,1426,1410,1154,1162,1674,1706,682,686,558,556,812,828,2876,2940,2932,3956,3957,3445,3447,3191,3159,1111,1107,83,91,219,203,459,395,393,905,909,1933,1925,3973,4005,3749,3748,3236,3238,2214,2230,2102,2166,2422,2430,2426,378,376,1400,1368,1880,1864,1608,1600,3648,3649,2625,2561,2689,2691,2695,2951,2959,2447,2479,3503,3519,1471,1469,1213,1209,1721,1785,761,753,625,624,626,882,850,2898,2882,3906,3914,3402,3406,3150,3086,1038,1036,12,28,20,148,180,436,437,949,951,1975,1971,4019,4083,3827,3835,3323,3307,2283,2281,2249,2121,2125,2381,2373,325,324,1348,1284,1796,1798,1542,1558,3606,3614,3646,2622,2618,2746,2744,3000,2984,2472,2536,3560,3552,1504,1505,1249,1251,1763,1731,1735,711,719,591,607,863,799,2847,2845,3869,3865,3353,3345,3089,3121,3120,1072,1074,50,34,162,226,482,490,1002,1006,2030,2028,4076,4044,3788,3804,3796,3284,3285,2261,2197,2069,2071,2327,2323,275,283,1307,1339,1851,1835,1833,1577,1581,3629,3693,2669,2661,2789,2788,3044,3046,2534,2502,3526,3542,1494,1502,1498,1242,1178,1690,1688,664,648,520,512,768,800,2848,2849,3873,3875,3879,3367,3431,3175,3183,1135,1151,127,125,253,221,477,473,985,977,2001,2000,1936,3984,3986,3730,3714,3202,3210,2186,2218,2090,2094,2350,2348,300,316,380,1404,1396,1908,1909,1653,1655,3703,3671,2647,2643,2771,2779,3035,3019,2507,2443,2441,3465,3469,1421,1413,1157,1189,1701,1700,676,678,550,566,822,886,894,2942,2938,3962,3960,3448,3416,3160,3144,1096,1088,64,65,193,129,385,387,391,903,911,1935,1967,4015,4031,3775,3773,3261,3257,2233,2297,2169,2161,2160,2416,2418,370,338,1362,1346,1858,1866,1610,1614,3662,3598,2574,2572,2700,2716,2708,2964,2996,2484,2485,3509,3511,1463,1459,1203,1267,1779,1787,763,747,745,617,585,841,845,2893,2885,3909,3908,3396,3332,3076,3078,1030,1046,22,30,62,190,186,442,440,952,936,1960,2024,4072,4064,3808,3809,3297,3299,3267,2243,2247,2119,2127,2383,2399,351,287,1311,1309,1821,1817,1561,1553,3601,3633,3632,2608,2610,2738,2722,2978,3042,2530,2538,3562,3566,1518,1516,1260,1228,1244,1756,1748,724,725,597,533,789,791,2839,2835,3859,3867,3355,3387,3131,3115,3113,1065,1069,45,109,237,229,485,484,996,998,2022,1990,4038,4054,4062,3806,3802,3290,3226,2202,2200,2072,2056,2312,2304,256,288,1312,1313,1825,1827,1831,1575,1639,3687,3695,2671,2687,2815,2813,3069,3037,2525,2521,3545,3537,3536,1488,1424,1168,1170,1682,1666,642,650,522,554,810,814,2862,2860,3884,3900,3964,3452,3444,3188,3189,1141,1143,119,87,215,211,467,475,987,971,907,1931,1929,3977,3981,3725,3717,3205,3237,2213,2212,2084,2086,2342,2358,310,374,382,1406,1402,1914,1912,1656,1624,3672,3656,2632,2624,2752,2753,3009,2945,2947,2435,2439,3463,3471,1423,1455,1199,1215,1727,1725,701,697,569,633,889,881,880,2928,2930,3954,3922,3410,3394,3138,3146,1098,1102,78,14,142,140,156,412,404,916,948,1972,1973,4021,4023,3767,3763,3251,3315,2291,2299,2171,2155,2153,2409,2377,329,333,1357,1349,1861,1860,1604,1540,3588,3590,2566,2582,2590,2718,2750,3006,3002,2490,2488,3512,3496,1448,1512,1256,1248,1760,1761,737,739,707,579,583,839,847,2895,2911,3935,3871,3359,3357,3101,3097,1049,1041,1073,49,48,176,178,434,418,930,994,2018,2026,4074,4078,3822,3820,3308,3276,3292,2268,2260,2132,2133,2389,2325,277,279,1303,1299,1811,1819,1563,1595,1579,3627,3625,2601,2605,2733,2797,3053,3045,2533,2532,3556,3558,1510,1478,1222,1238,1246,1758,1754,730,666,538,536,792,776,2824,2816,3840,3872,3360,3361,3363,3107,3111,1063,1127,103,111,239,255,511,509,1021,989,2013,2009,4057,4049,4048,3792,3728,3216,3218,2194,2178,2050,2058,2314,2346,298,302,1326,1324,1340,1852,1916,1660,1652,3700,3701,2677,2679,2807,2775,3031,3027,2515,2523,3547,3531,3467,1419,1417,1161,1165,1677,1669,645,677,549,548,804,806,2854,2870,2934,3958,3966,3454,3450,3194,3192,1144,1112,88,72,200,192,448,449,961,897,899,1923,1927,3975,3983,3727,3759,3247,3263,2239,2237,2109,2105,2361,2425,2417,369,368,1392,1394,1906,1874,1618,1602,3650,3658,2634,2638,2766,2702,2958,2956,2972,2460,2452,3476,3508,1460,1461,1205,1207,1719,1715,691,755,627,635,619,875,873,2921,2889,3913,3917,3405,3397,3141,3140,1092,1028,4,6,134,150,158,414,446,958,954,1978,1976,4024,4008,3752,3816,3304,3296,2272,2273,2275,2147,2115,2371,2375,327,335,1359,1375,1887,1823,1567,1565,3613,3609,2585,2577,2609,2737,2736,2992,2994,2482,2466,3490,3554,1506,1514,1258,1262,1774,1772,1740,716,732,604,596,852,853,2901,2837,3861,3863,3351,3347,3091,3099,1051,1083,1067,43,41,169,173,429,493,1005,997,2021,2020,4068,4070,3814,3782,3798,3286,3294,2270,2266,2138,2074,2330,2328,280,264,1288,1280,1792,1824,1568,1569,1571,3619,3623,2599,2663,2791,2799,3055,3071,2559,2557,3581,3549,1501,1497,1489,1233,1232,1744,1680,656,658,530,514,770,778,2826,2858,3882,3886,3374,3372,3388,3132,3196,1148,1140,116,117,245,247,503,471,983,979,2003,2011,1995,4043,3979,3723,3721,3209,3213,2189,2181,2053,2085,2341,2340,292,294,1318,1334,1398,1910,1918,1662,1658,3706,3704,2680,2648,2776,2760,3016,3008,2496,2497,2433,3457,3459,1411,1415,1159,1167,1679,1711,687,703,575,573,829,825,2873,2937,2929,3953,3952,3440,3442,3186,3154,1106,1090,66,74,202,206,462,398,396,908,924,1948,1940,3988,4020,3764,3765,3253,3255,2231,2227,2099,2163,2419,2427,2411,363,361,1385,1353,1865,1869,1613,1605,3653,3652,2628,2564,2692,2694,2710,2966,2974,2462,2494,3518,3514,1466,1464,1208,1192,1704,1768,744,736,608,609,611,867,835,2883,2887,3911,3919,3407,3423,3167,3103,1055,1053,29,25,17,145,177,433,432,944,946,1970,1954,4002,4066,3810,3818,3306,3310,2286,2284,2252,2124,2140,2396,2388,340,341,1365,1301,1813,1815,1559,1555,3603,3611,3643,2619,2603,2731,2729,2985,2989,2477,2541,3565,3557,1509,1508,1252,1254,1766,1734,1750,726,734,606,602,858,794,2842,2840,3864,3848,3336,3328,3072,3104,3105,1057,1059,35,39,167,231,487,495,1007,1023,2047,2045,4093,4061,3805,3801,3793,3281,3280,2256,2192,2064,2066,2322,2306,258,266,1290,1322,1834,1838,1836,1580,1596,3644,3708,2684,2676,2804,2805,3061,3063,2551,2519,3543,3539,1491,1499,1483,1227,1163,1675,1673,649,653,525,517,773,805,2853,2852,3876,3878,3894,3382,3446,3190,3198,1150,1146,122,120,248,216,472,456,968,960,1984,1985,1921,3969,3971,3715,3719,3207,3215,2191,2223,2095,2111,2367,2365,317,313,377,1401,1393,1905,1904,1648,1650,3698,3666,2642,2626,2754,2762,3018,3022,2510,2446,2444,3468,3484,1436,1428,1172,1204,1716,1717,693,695,567,563,819,883,891,2939,2923,3947,3945,3433,3401,3145,3149,1101,1093,69,68,196,132,388,390,406,918,926,1950,1982,4030,4026,3770,3768,3256,3240,2216,2280,2152,2144,2145,2401,2403,355,323,1347,1351,1863,1871,1615,1631,3679,3615,2591,2589,2717,2713,2705,2961,2993,2481,2480,3504,3506,1458,1442,1186,1250,1762,1770,746,750,748,620,588,844,860,2908,2900,3924,3925,3413,3349,3093,3095,1047,1043,19,27,59,187,171,427,425,937,941,1965,2029,4077,4069,3813,3812,3300,3302,3270,2246,2262,2134,2142,2398,2394,346,282,1306,1304,1816,1800,1544,1536,3584,3616,3617,2593,2595,2723,2727,2983,3047,2535,2543,3567,3583,1535,1533,1277,1245,1241,1753,1745,721,720,592,528,784,786,2834,2818,3842,3850,3338,3370,3114,3118,3116,1068,1084,60,124,252,244,500,501,1013,1015,2039,2007,4055,4051,4059,3803,3787,3275,3211,2187,2185,2057,2061,2317,2309,261,293,1317,1316,1828,1830,1846,1590,1654,3702,3710,2686,2682,2810,2808,3064,3032,2520,2504,3528,3520,3521,1473,1409,1153,1155,1667,1671,647,655,527,559,815,831,2879,2877,3901,3897,3961,3449,3441,3185,3184,1136,1138,114,82,210,194,450,458,970,974,910,1934,1932,3980,3996,3740,3732,3220,3252,2228,2229,2101,2103,2359,2355,307,371,379,1403,1387,1899,1897,1641,1609,3657,3661,2637,2629,2757,2756,3012,2948,2950,2438,2454,3478,3486,1438,1470,1214,1210,1722,1720,696,680,552,616,872,864,865,2913,2915,3939,3907,3395,3399,3143,3151,1103,1119,95,31,159,157,153,409,401,913,945,1969,1968,4016,4018,3762,3746,3234,3298,2274,2282,2154,2158,2156,2412,2380,332,348,1372,1364,1876,1877,1621,1557,3605,3607,2583,2579,2587,2715,2747,3003,2987,2475,2473,3497,3501,1453,1517,1261,1253,1765,1764,740,742,710,582,598,854,862,2910,2906,3930,3866,3354,3352,3096,3080,1032,1024,1056,32,33,161,163,419,423,935,999,2023,2031,4079,4095,3839,3837,3325,3293,3289,2265,2257,2129,2128,2384,2320,272,274,1298,1282,1794,1802,1546,1578,1582,3630,3628,2604,2620,2748,2812,3068,3060,2548,2549,3573,3575,1527,1495,1239,1235,1243,1755,1739,715,651,523,521,777,781,2829,2821,3845,3877,3365,3364,3366,3110,3126,1078,1142,118,126,254,250,506,504,1016,984,2008,1992,4040,4032,4033,3777,3713,3201,3203,2179,2183,2055,2063,2319,2351,303,319,1343,1341,1337,1849,1913,1657,1649,3697,3696,2672,2674,2802,2770,3026,3010,2498,2506,3530,3534,3470,1422,1420,1164,1180,1692,1684,660,692,564,565,821,823,2871,2867,2931,3955,3963,3451,3435,3179,3177,1129,1097,73,77,205,197,453,452,964,900,902,1926,1942,3990,3998,3742,3774,3262,3258,2234,2232,2104,2088,2344,2408,2400,352,353,1377,1379,1891,1859,1603,1607,3655,3663,2639,2655,2783,2719,2975,2973,2969,2457,2449,3473,3505,1457,1456,1200,1202,1714,1698,674,738,610,618,622,878,876,2924,2892,3916,3932,3420,3412,3156,3157,1109,1045,21,23,151,147,155,411,443,955,939,1963,1961,4009,4013,3757,3821,3309,3301,2277,2276,2278,2150,2118,2374,2390,342,350,1374,1370,1882,1818,1562,1560,3608,3592,2568,2560,2592,2720,2721,2977,2979,2467,2471,3495,3559,1511,1519,1263,1279,1791,1789,1757,733,729,601,593,849,848,2896,2832,3856,3858,3346,3330,3074,3082,1034,1066,1070,46,44,172,188,444,508,1020,1012,2036,2037,4085,4087,3831,3799,3795,3283,3291,2267,2251,2123,2059,2315,2313,265,269,1293,1285,1797,1829,1573,1572,1574,3622,3638,2614,2678,2806,2814,3070,3066,2554,2552,3576,3544,1496,1480,1472,1216,1217,1729,1665,641,643,515,519,775,783,2831,2863,3887,3903,3391,3389,3385,3129,3193,1145,1137,113,112,240,242,498,466,978,962,1986,1994,1998,4046,3982,3726,3724,3212,3228,2204,2196,2068,2100,2356,2357,309,311,1335,1331,1395,1907,1915,1659,1643,3691,3689,2665,2633,2761,2765,3021,3013,2501,2500,2436,3460,3462,1414,1430,1174,1182,1694,1726,702,698,570,568,824,808,2856,2920,2912,3936,3937,3425,3427,3171,3139,1091,1095,71,79,207,223,479,415,413,925,921,1945,1937,3985,4017,3761,3760,3248,3250,2226,2210,2082,2146,2402,2410,2414,366,364,1388,1356,1868,1884,1628,1620,3668,3669,2645,2581,2709,2711,2707,2963,2971,2459,2491,3515,3499,1451,1449,1193,1197,1709,1773,749,741,613,612,614,870,838,2886,2902,3926,3934,3422,3418,3162,3098,1050,1048,24,8);
const int lrgc_13[8192] = int[](0,1024,1025,1281,1297,1361,1363,1367,1879,3927,4055,4054,4062,4094,4030,3774,3770,2746,2730,2602,2600,2592,2560,2624,2625,6721,6725,6741,6869,6871,6879,6911,6847,7871,7359,7355,7339,7211,7210,7202,7170,5122,5186,5184,5188,5204,5332,5333,5341,4317,4349,4285,4541,4537,4521,4393,4395,299,291,259,323,322,326,342,470,1494,1492,1500,1532,1468,1980,1976,1960,4008,3880,3881,3625,3593,3657,3659,3651,2627,2643,2771,2770,2774,2806,2742,2230,6326,6334,6318,6190,6188,6184,6152,6216,7240,7241,7233,7249,7377,7379,7383,7415,5367,5303,5559,5567,5551,5423,5422,5418,4394,4362,4426,4424,4416,4432,4560,4561,465,469,501,437,949,957,941,813,1837,1839,1835,1803,1867,1866,1858,1874,3922,4050,4048,4052,4084,4020,3764,3772,2748,2732,2604,2605,2093,2061,2125,2127,6223,6219,6235,6363,6362,6354,6386,6322,7346,7602,7606,7590,7462,7460,7468,7436,5388,5452,5453,5449,5465,5593,5595,5587,4563,4595,4531,5043,5047,5031,4903,4902,806,814,782,846,844,840,856,984,2008,2009,2001,2033,1969,1713,1717,1701,3749,3621,3623,3631,3599,3663,3662,3658,2634,2650,2778,2776,2768,2800,2736,2224,6320,6324,6308,6180,6181,6437,6405,6469,7493,7495,7503,7519,7647,7646,7642,7674,5626,5562,6074,6066,6050,5922,5920,5924,4900,4868,4932,4933,4941,4957,5085,5087,991,987,1019,955,699,691,675,547,1571,1570,1574,1542,1606,1604,1612,1628,3676,3804,3805,3801,3833,3769,3257,3249,2225,2209,2081,2083,2087,2055,2119,2118,6214,6222,6238,6366,6364,6360,6392,6328,7352,7608,7600,7584,7456,7457,7969,7937,5889,5953,5955,5959,5703,5831,5830,5838,4814,4830,4766,4254,4250,4282,4154,4152,56,48,32,96,97,101,69,197,1221,1223,1231,1247,1183,1439,1435,1467,3515,3387,3386,3378,3362,3426,3424,3428,2404,2372,2500,2501,2509,2525,2461,2973,7069,7065,7097,6969,6971,6963,6947,7011,8035,8034,8038,8006,8134,8132,8140,8156,6108,6044,5788,5784,5816,5688,5689,5177,4153,4137,4201,4203,4195,4163,4291,4290,194,198,214,150,406,414,446,318,1342,1340,1336,1320,1384,1385,1377,1345,3393,3521,3523,3527,3543,3479,3991,3999,2975,3007,2879,2878,2874,2858,2922,2920,7016,7008,6976,7104,7105,7109,7125,7061,8085,7829,7837,7869,7741,7743,7739,7723,5675,5739,5738,5730,5698,5826,5824,5828,4804,4820,4756,4244,4252,4284,4156,4157,61,317,301,365,367,363,331,459,1483,1482,1474,1490,1426,1938,1942,1974,4022,3894,3892,3900,3884,3948,3949,3945,2921,2889,3017,3019,3011,3027,2963,2707,6803,6807,6839,6711,6710,6718,6702,6766,7790,7788,7784,7752,7880,7881,7873,7889,5841,5777,5265,5269,5301,5173,5175,5183,4159,4143,4207,4206,4202,4170,4298,4296,200,192,208,144,400,404,436,308,1332,1333,1845,1829,1893,1895,1903,1871,3919,4047,4046,4042,4058,3994,3738,3730,2706,2738,2610,2608,2612,2596,2660,2661,6757,6765,6733,6861,6863,6859,6875,6811,7835,7323,7315,7347,7219,7218,7222,7206,5158,5222,5220,5228,5196,5324,5325,5321,4297,4313,4249,4505,4497,4529,4401,4403,307,311,295,359,358,366,334,462,1486,1484,1480,1496,1432,1944,1936,1968,4016,3888,3889,3633,3617,3681,3683,3687,2663,2151,2279,2278,2286,2254,2190,2446,6542,6538,6554,6426,6424,6416,6448,6512,7536,7537,7541,7525,7653,7655,7663,7631,5583,5519,6031,6027,6043,5915,5914,5906,4882,4914,4978,4976,4980,4964,5092,5093,997,1005,973,909,653,649,665,537,1561,1563,1555,1587,1651,1650,1654,1638,3686,3814,3812,3820,3788,3724,3212,3208,2184,2200,2072,2073,2329,2361,2425,2427,6523,6515,6499,6627,6626,6630,6598,6534,7558,8070,8078,8094,7966,7964,7960,7992,5944,6008,6009,6001,5985,6113,6115,6119,5095,5063,4999,4743,4751,4767,4639,4638,542,538,570,634,632,624,608,736,1760,1761,1765,1733,1669,1157,1165,1181,3229,3101,3103,3099,3131,3195,3194,3186,2162,2146,2274,2272,2276,2244,2180,2436,6532,6540,6556,6428,6429,6941,6973,7037,8061,8063,8059,8043,8171,8170,8162,8130,6082,6018,5762,5766,5782,5654,5652,5660,4636,4668,4732,4733,4729,4713,4841,4843,747,739,707,643,131,135,151,23,1047,1046,1054,1086,1150,1148,1144,1128,3176,3304,3305,3297,3265,3201,3457,3461,2437,2453,2325,2327,2335,2367,2431,2430,6526,6522,6506,6634,6632,6624,6592,6528,7552,8064,8068,8084,7956,7957,7701,7733,5685,5749,5751,5759,5743,5871,5870,5866,4842,4810,4746,4234,4226,4242,4114,4112,16,20,52,116,117,125,109,237,1261,1263,1259,1227,1163,1419,1411,1427,3475,3347,3346,3350,3382,3446,3444,3452,2428,2412,2540,2541,2537,2505,2441,2953,7049,7041,7057,6929,6931,6935,6967,7031,8055,8054,8062,8046,8174,8172,8168,8136,6088,6024,5768,5760,5776,5648,5649,5137,4113,4145,4209,4211,4215,4471,4599,4598,502,510,494,430,942,938,906,778,1802,1800,1792,1808,1872,1873,1877,1909,3957,4085,4087,4095,4079,4015,3759,3755,2731,2699,2571,2570,2562,2578,2642,2640,6736,6740,6772,6900,6901,6909,6893,6829,7853,7341,7337,7305,7177,7179,7171,7187,5139,5203,5202,5206,5238,5366,5364,5372,4348,4332,4268,4524,4520,4488,4360,4361,265,777,793,857,859,851,883,1011,2035,2034,2038,2022,1958,1702,1710,1678,3726,3598,3596,3592,3608,3672,3673,3665,2641,2673,2801,2803,2807,2791,2727,2215,6311,6319,6287,6159,6158,6154,6170,6234,7258,7256,7248,7280,7408,7409,7413,7397,5349,5285,5541,5549,5517,5389,5391,5387,4363,4379,4443,4442,4434,4466,4594,4592,496,500,484,420,932,940,908,780,1804,1805,1549,1565,1629,1631,1627,1659,3707,3835,3834,3826,3810,3746,3234,3238,2214,2182,2054,2052,2060,2076,2140,2141,6237,6233,6265,6393,6395,6387,6371,6307,7331,7587,7591,7559,7431,7430,7438,7454,5406,5470,5468,5464,5496,5624,5625,5617,4593,4577,4513,5025,5029,4997,4869,4871,775,783,799,863,862,858,890,1018,2042,2040,2032,2016,1952,1696,1700,1668,3716,3588,3589,3077,3093,3157,3159,3167,2143,2175,2303,2302,2298,2282,2218,2474,6570,6562,6530,6402,6400,6404,6420,6484,7508,7509,7517,7549,7677,7679,7675,7659,5611,5547,6059,6051,6019,5891,5890,5894,4870,4886,4950,4948,4956,4988,5116,5117,1021,1017,1001,937,681,673,641,513,1537,1539,1543,1559,1623,1622,1630,1662,3710,3838,3836,3832,3816,3752,3240,3232,2208,2176,2048,2049,2305,2321,2385,2387,6483,6487,6999,7127,7126,7134,7166,7102,8126,7870,7866,7850,7722,7720,7712,7680,5632,5696,5697,5701,5717,5845,5847,5855,4831,4863,4799,4287,4283,4267,4139,4138,42,34,2,66,64,68,84,212,1236,1237,1245,1277,1213,1469,1465,1449,3497,3369,3371,3363,3331,3395,3394,3398,2374,2390,2518,2516,2524,2556,2492,3004,7100,7096,7080,6952,6953,6697,6665,6729,7753,7755,7747,7763,7891,7890,7894,7926,5878,5814,5302,5310,5294,5166,5164,5160,4136,4104,4168,4169,4161,4177,4305,4307,211,215,247,183,439,447,431,303,1327,1326,1322,1290,1354,1352,1344,1360,3408,3536,3537,3541,3573,3509,4021,4029,3005,2989,2861,2863,2859,2827,2891,2890,6986,6978,6994,7122,7120,7124,7156,7092,8116,7860,7868,7852,7724,7725,7213,7181,5133,5197,5199,5195,5211,5339,5338,5330,4306,4338,4274,4530,4534,4518,4390,4388,292,300,268,332,333,329,345,473,1497,1499,1491,1523,1459,1971,1975,1959,4007,3879,3878,3886,3854,3918,3916,3912,2888,2904,3032,3033,3025,3057,2993,2737,6833,6837,6821,6693,6695,6703,6671,6735,7759,7758,7754,7770,7898,7896,7888,7920,5872,5808,5296,5300,5284,5156,5157,5413,4389,4357,4421,4423,4431,4447,4575,4574,478,474,506,442,954,946,930,802,1826,1824,1828,1796,1860,1861,1869,1885,3933,4061,4063,4059,4091,4027,3771,3763,2739,2723,2595,2594,2598,2566,2630,2628,6724,6732,6748,6876,6877,6873,6905,6841,7865,7353,7345,7329,7201,7203,7207,7175,5127,5191,5190,5198,5214,5342,5340,5336,4312,4344,4280,4536,4528,4512,4384,4385,289,801,769,833,835,839,583,711,1735,1734,1742,1758,1694,1182,1178,1210,3258,3130,3128,3120,3104,3168,3169,3173,2149,2117,2245,2247,2255,2271,2207,2463,6559,6555,6587,6459,6458,6450,6434,6498,7522,7520,7524,7492,7620,7621,7629,7645,5597,5533,6045,6041,6073,5945,5947,5939,4915,4899,4963,4962,4966,4934,5062,5060,964,972,988,924,668,664,696,568,1592,1593,1081,1065,1129,1131,1123,1091,3139,3267,3266,3270,3286,3222,3478,3486,2462,2494,2366,2364,2360,2344,2408,2409,6505,6497,6465,6593,6595,6599,6615,6551,7575,8087,8095,8127,7999,7998,7994,7978,5930,5994,5992,5984,5952,6080,6081,6085,5061,5077,5013,4757,4765,4797,4669,4671,575,571,555,619,618,610,578,706,1730,1728,1732,1748,1684,1172,1180,1212,3260,3132,3133,3389,3373,3437,3439,3435,2411,2379,2507,2506,2498,2514,2450,2962,7058,7062,7094,6966,6964,6972,6956,7020,8044,8045,8041,8009,8137,8139,8131,8147,6099,6035,5779,5783,5815,5687,5686,5694,4670,4654,4718,4716,4712,4680,4808,4809,713,705,721,657,145,149,181,53,1077,1079,1087,1071,1135,1134,1130,1098,3146,3274,3272,3264,3280,3216,3472,3476,2452,2484,2356,2357,2869,2853,2917,2919,7015,7023,6991,7119,7118,7114,7130,7066,8090,7834,7826,7858,7730,7728,7732,7716,5668,5732,5733,5741,5709,5837,5839,5835,4811,4827,4763,4251,4243,4275,4147,4146,50,54,38,102,100,108,76,204,1228,1229,1225,1241,1177,1433,1425,1457,3505,3377,3379,3383,3367,3431,3430,3438,2414,2382,2510,2508,2504,2520,2456,2968,7064,7056,7088,6960,6961,6705,6689,6753,7777,7779,7783,7271,7399,7398,7406,7374,5326,5262,5518,5514,5530,5402,5400,5392,4368,4400,4464,4465,4469,4453,4581,4583,487,495,463,399,911,907,923,795,1819,1818,1810,1842,1906,1904,1908,1892,3940,4068,4069,4077,4045,3981,3725,3721,2697,2713,2585,2587,2579,2611,2675,2674,6770,6774,6758,6886,6884,6892,6860,6796,7820,7308,7304,7320,7192,7193,7449,7481,5433,5497,5499,5491,5475,5603,5602,5606,4582,4550,4486,4998,5006,5022,4894,4892,796,792,824,888,889,881,865,993,2017,2019,2023,1991,1927,1671,1679,1695,3743,3615,3614,3610,3642,3706,3704,3696,2672,2656,2784,2785,2789,2757,2693,2181,6277,6285,6301,6173,6175,6171,6203,6267,7291,7290,7282,7266,7394,7392,7396,7364,5316,5252,5508,5516,5532,5404,5405,5917,4893,4925,4989,4991,4987,4971,5099,5098,1002,994,962,898,642,646,662,534,1558,1556,1564,1596,1660,1661,1657,1641,3689,3817,3819,3811,3779,3715,3203,3207,2183,2199,2071,2070,2078,2110,2174,2172,6268,6264,6248,6376,6377,6369,6337,6273,7297,7553,7557,7573,7445,7447,7455,7487,5439,5503,5502,5498,5482,5610,5608,5600,4576,4544,4480,4992,4996,5012,4884,4885,789,533,565,629,631,639,623,751,1775,1774,1770,1738,1674,1162,1154,1170,3218,3090,3088,3092,3124,3188,3189,3197,2173,2157,2285,2287,2283,2251,2187,2443,6539,6531,6547,6419,6418,6422,6454,6518,7542,7540,7548,7532,7660,7661,7657,7625,5577,5513,6025,6017,6033,5905,5907,5911,4887,4919,4983,4982,4990,4974,5102,5100,1004,1000,968,904,648,640,656,528,1552,1553,1041,1073,1137,1139,1143,1399,3447,3575,3574,3582,3566,3502,4014,4010,2986,2954,2826,2824,2816,2832,2896,2897,6993,6997,7029,7157,7159,7167,7151,7087,8111,7855,7851,7819,7691,7690,7682,7698,5650,5714,5712,5716,5748,5876,5877,5885,4861,4845,4781,4269,4265,4233,4105,4107,11,3,19,83,82,86,118,246,1270,1268,1276,1260,1196,1452,1448,1416,3464,3336,3337,3849,3865,3929,3931,3923,2899,2931,3059,3058,3062,3046,2982,2726,6822,6830,6798,6670,6668,6664,6680,6744,7768,7769,7761,7793,7921,7923,7927,7911,5863,5799,5287,5295,5263,5135,5134,5130,4106,4122,4186,4184,4176,4208,4336,4337,241,245,229,165,421,429,397,269,1293,1295,1291,1307,1371,1370,1362,1394,3442,3570,3568,3572,3556,3492,4004,4012,2988,2956,2828,2829,2573,2589,2653,2655,6751,6747,6779,6907,6906,6898,6882,6818,7842,7330,7334,7302,7174,7172,7180,7196,5148,5212,5213,5209,5241,5369,5371,5363,4339,4323,4259,4515,4519,4487,4359,4358,262,270,286,350,348,344,376,504,1528,1529,1521,1505,1441,1953,1957,1925,3973,3845,3847,3855,3871,3935,3934,3930,2906,2938,3066,3064,3056,3040,2976,2720,6816,6820,6788,6660,6661,6149,6165,6229,7253,7255,7263,7295,7423,7422,7418,7402,5354,5290,5546,5538,5506,5378,5376,5380,4356,4372,4436,4437,4445,4477,4605,4607,511,507,491,427,939,931,899,771,1795,1794,1798,1814,1878,1876,1884,1916,3964,4092,4093,4089,4073,4009,3753,3745,2721,2689,2561,2563,2567,2583,2647,2646,6742,6750,6782,6910,6908,6904,6888,6824,7848,7336,7328,7296,7168,7169,7425,7441,5393,5457,5459,5463,5975,6103,6102,6110,5086,5118,5054,4798,4794,4778,4650,4648,552,544,512,576,577,581,597,725,1749,1751,1759,1791,1727,1215,1211,1195,3243,3115,3114,3106,3074,3138,3136,3140,2116,2132,2260,2261,2269,2301,2237,2493,6589,6585,6569,6441,6443,6435,6403,6467,7491,7490,7494,7510,7638,7636,7644,7676,5628,5564,6076,6072,6056,5928,5929,5673,4649,4617,4681,4683,4675,4691,4819,4818,722,726,758,694,182,190,174,46,1070,1068,1064,1032,1096,1097,1089,1105,3153,3281,3283,3287,3319,3255,3511,3519,2495,2479,2351,2350,2346,2314,2378,2376,6472,6464,6480,6608,6609,6613,6645,6581,7605,8117,8125,8109,7981,7983,7979,7947,5899,5963,5962,5954,5970,6098,6096,6100,5076,5108,5044,4788,4796,4780,4652,4653,557,45,13,77,79,75,91,219,1243,1242,1234,1266,1202,1458,1462,1446,3494,3366,3364,3372,3340,3404,3405,3401,2377,2393,2521,2523,2515,2547,2483,2995,7091,7095,7079,6951,6950,6958,6926,6990,8014,8012,8008,8024,8152,8153,8145,8177,6129,6065,5809,5813,5797,5669,5671,5679,4655,4623,4687,4686,4682,4698,4826,4824,728,720,752,688,176,180,164,36,1060,1061,1317,1285,1349,1351,1359,1375,3423,3551,3550,3546,3578,3514,4026,4018,2994,2978,2850,2848,2852,2820,2884,2885,6981,6989,7005,7133,7135,7131,7163,7099,8123,7867,7859,7843,7715,7714,7718,7686,5638,5702,5700,5708,5724,5852,5853,5849,4825,4857,4793,4281,4273,4257,4129,4131,35,39,7,71,70,78,94,222,1246,1244,1240,1272,1208,1464,1456,1440,3488,3360,3361,3873,3841,3905,3907,3911,2887,2631,2759,2758,2766,2782,2718,2206,6302,6298,6330,6202,6200,6192,6176,6240,7264,7265,7269,7237,7365,7367,7375,7391,5343,5279,5535,5531,5563,5435,5434,5426,4402,4386,4450,4448,4452,4420,4548,4549,453,461,477,413,925,921,953,825,1849,1851,1843,1827,1891,1890,1894,1862,3910,4038,4036,4044,4060,3996,3740,3736,2712,2744,2616,2617,2105,2089,2153,2155,6251,6243,6211,6339,6338,6342,6358,6294,7318,7574,7582,7614,7486,7484,7480,7464,5416,5480,5481,5473,5441,5569,5571,5575,4551,4567,4503,5015,5023,5055,4927,4926,830,826,810,874,872,864,832,960,1984,1985,1989,2005,1941,1685,1693,1725,3773,3645,3647,3643,3627,3691,3690,3682,2658,2626,2754,2752,2756,2772,2708,2196,6292,6300,6332,6204,6205,6461,6445,6509,7533,7535,7531,7499,7627,7626,7618,7634,5586,5522,6034,6038,6070,5942,5940,5948,4924,4908,4972,4973,4969,4937,5065,5067,971,963,979,915,659,663,695,567,1591,1590,1598,1582,1646,1644,1640,1608,3656,3784,3785,3777,3793,3729,3217,3221,2197,2229,2101,2103,2111,2095,2159,2158,6254,6250,6218,6346,6344,6336,6352,6288,7312,7568,7572,7604,7476,7477,7989,7973,5925,5989,5991,5999,5967,6095,6094,6090,5066,5082,5018,4762,4754,4786,4658,4656,560,564,548,612,613,621,589,717,1741,1743,1739,1755,1691,1179,1171,1203,3251,3123,3122,3126,3110,3174,3172,3180,2156,2124,2252,2253,2249,2265,2201,2457,6553,6545,6577,6449,6451,6455,6439,6503,7527,7526,7534,7502,7630,7628,7624,7640,5592,5528,6040,6032,6064,5936,5937,5681,4657,4641,4705,4707,4711,4199,4327,4326,230,238,206,142,398,394,410,282,1306,1304,1296,1328,1392,1393,1397,1381,3429,3557,3559,3567,3535,3471,3983,3979,2955,2971,2843,2842,2834,2866,2930,2928,7024,7028,7012,7140,7141,7149,7117,7053,8077,7821,7817,7833,7705,7707,7699,7731,5683,5747,5746,5750,5734,5862,5860,5868,4844,4812,4748,4236,4232,4248,4120,4121,25,281,313,377,379,371,355,483,1507,1506,1510,1478,1414,1926,1934,1950,3998,3870,3868,3864,3896,3960,3961,3953,2929,2913,3041,3043,3047,3015,2951,2695,6791,6799,6815,6687,6686,6682,6714,6778,7802,7800,7792,7776,7904,7905,7909,7877,5829,5765,5253,5261,5277,5149,5151,5147,4123,4155,4219,4218,4210,4194,4322,4320,224,228,196,132,388,396,412,284,1308,1309,1821,1853,1917,1919,1915,1899,3947,4075,4074,4066,4034,3970,3714,3718,2694,2710,2582,2580,2588,2620,2684,2685,6781,6777,6761,6889,6891,6883,6851,6787,7811,7299,7303,7319,7191,7190,7198,7230,5182,5246,5244,5240,5224,5352,5353,5345,4321,4289,4225,4481,4485,4501,4373,4375,279,287,319,383,382,378,362,490,1514,1512,1504,1472,1408,1920,1924,1940,3988,3860,3861,3605,3637,3701,3703,3711,2687,2671,2799,2798,2794,2762,2698,2186,6282,6274,6290,6162,6160,6164,6196,6260,7284,7285,7293,7277,7405,7407,7403,7371,5323,5259,5515,5507,5523,5395,5394,5398,4374,4406,4470,4468,4476,4460,4588,4589,493,489,457,393,905,897,913,785,1809,1811,1815,1847,1911,1910,1918,1902,3950,4078,4076,4072,4040,3976,3720,3712,2688,2704,2576,2577,2065,2097,2161,2163,6259,6263,6519,6647,6646,6654,6638,6574,7598,8110,8106,8074,7946,7944,7936,7952,5904,5968,5969,5973,6005,6133,6135,6143,5119,5103,5039,4783,4779,4747,4619,4618,522,514,530,594,592,596,628,756,1780,1781,1789,1773,1709,1197,1193,1161,3209,3081,3083,3075,3091,3155,3154,3158,2134,2166,2294,2292,2300,2284,2220,2476,6572,6568,6536,6408,6409,6921,6937,7001,8025,8027,8019,8051,8179,8178,8182,8166,6118,6054,5798,5806,5774,5646,5644,5640,4616,4632,4696,4697,4689,4721,4849,4851,755,759,743,679,167,175,143,15,1039,1038,1034,1050,1114,1112,1104,1136,3184,3312,3313,3317,3301,3237,3493,3501,2477,2445,2317,2319,2315,2331,2395,2394,6490,6482,6514,6642,6640,6644,6628,6564,7588,8100,8108,8076,7948,7949,7693,7709,5661,5725,5727,5723,5755,5883,5882,5874,4850,4834,4770,4258,4262,4230,4102,4100,4,12,28,92,93,89,121,249,1273,1275,1267,1251,1187,1443,1447,1415,3463,3335,3334,3342,3358,3422,3420,3416,2392,2424,2552,2553,2545,2529,2465,2977,7073,7077,7045,6917,6919,6927,6943,7007,8031,8030,8026,8058,8186,8184,8176,8160,6112,6048,5792,5796,5764,5636,5637,5125,4101,4117,4181,4183,4191,4223,4351,4350,254,250,234,170,426,418,386,258,1282,1280,1284,1300,1364,1365,1373,1405,3453,3581,3583,3579,3563,3499,4011,4003,2979,2947,2819,2818,2822,2838,2902,2900,6996,7004,7036,7164,7165,7161,7145,7081,8105,7849,7841,7809,7681,7683,7687,7703,5655,5719,5718,5726,5758,5886,5884,5880,4856,4840,4776,4264,4256,4224,4096,4097,1,257,273,337,339,343,855,983,2007,2006,2014,2046,1982,1726,1722,1706,3754,3626,3624,3616,3584,3648,3649,3653,2629,2645,2773,2775,2783,2815,2751,2239,6335,6331,6315,6187,6186,6178,6146,6210,7234,7232,7236,7252,7380,7381,7389,7421,5373,5309,5565,5561,5545,5417,5419,5411,4387,4355,4419,4418,4422,4438,4566,4564,468,476,508,444,956,952,936,808,1832,1833,1577,1545,1609,1611,1603,1619,3667,3795,3794,3798,3830,3766,3254,3262,2238,2222,2094,2092,2088,2056,2120,2121,6217,6209,6225,6353,6355,6359,6391,6327,7351,7607,7615,7599,7471,7470,7466,7434,5386,5450,5448,5440,5456,5584,5585,5589,4565,4597,4533,5045,5053,5037,4909,4911,815,811,779,843,842,834,850,978,2002,2000,2004,2036,1972,1716,1724,1708,3756,3628,3629,3117,3085,3149,3151,3147,2123,2139,2267,2266,2258,2290,2226,2482,6578,6582,6566,6438,6436,6444,6412,6476,7500,7501,7497,7513,7641,7643,7635,7667,5619,5555,6067,6071,6055,5927,5926,5934,4910,4878,4942,4940,4936,4952,5080,5081,985,977,1009,945,689,693,677,549,1573,1575,1583,1551,1615,1614,1610,1626,3674,3802,3800,3792,3824,3760,3248,3252,2228,2212,2084,2085,2341,2309,2373,2375,6471,6479,6495,6623,6622,6618,6650,6586,7610,8122,8114,8098,7970,7968,7972,7940,5892,5956,5957,5965,5981,6109,6111,6107,5083,5115,5051,4795,4787,4771,4643,4642,546,550,518,582,580,588,604,732,1756,1757,1753,1785,1721,1209,1201,1185,3233,3105,3107,3111,3079,3143,3142,3150,2126,2142,2270,2268,2264,2296,2232,2488,6584,6576,6560,6432,6433,6945,6913,6977,8001,8003,8007,7751,7879,7878,7886,7902,5854,5790,5278,5274,5306,5178,5176,5168,4144,4128,4192,4193,4197,4165,4293,4295,199,207,223,159,415,411,443,315,1339,1338,1330,1314,1378,1376,1380,1348,3396,3524,3525,3533,3549,3485,3997,3993,2969,3001,2873,2875,2867,2851,2915,2914,7010,7014,6982,7110,7108,7116,7132,7068,8092,7836,7832,7864,7736,7737,7225,7209,5161,5225,5227,5219,5187,5315,5314,5318,4294,4310,4246,4502,4510,4542,4414,4412,316,312,296,360,361,353,321,449,1473,1475,1479,1495,1431,1943,1951,1983,4031,3903,3902,3898,3882,3946,3944,3936,2912,2880,3008,3009,3013,3029,2965,2709,6805,6813,6845,6717,6719,6715,6699,6763,7787,7786,7778,7746,7874,7872,7876,7892,5844,5780,5268,5276,5308,5180,5181,5437,4413,4397,4461,4463,4459,4427,4555,4554,458,450,466,402,914,918,950,822,1846,1844,1852,1836,1900,1901,1897,1865,3913,4041,4043,4035,4051,3987,3731,3735,2711,2743,2615,2614,2622,2606,2670,2668,6764,6760,6728,6856,6857,6849,6865,6801,7825,7313,7317,7349,7221,7223,7231,7215,5167,5231,5230,5226,5194,5322,5320,5312,4288,4304,4240,4496,4500,4532,4404,4405,309,821,805,869,871,879,847,975,1999,1998,1994,2010,1946,1690,1682,1714,3762,3634,3632,3636,3620,3684,3685,3693,2669,2637,2765,2767,2763,2779,2715,2203,6299,6291,6323,6195,6194,6198,6182,6246,7270,7268,7276,7244,7372,7373,7369,7385,5337,5273,5529,5521,5553,5425,5427,5431,4407,4391,4455,4454,4462,4430,4558,4556,460,456,472,408,920,912,944,816,1840,1841,1585,1569,1633,1635,1639,1127,3175,3303,3302,3310,3278,3214,3470,3466,2442,2458,2330,2328,2320,2352,2416,2417,6513,6517,6501,6629,6631,6639,6607,6543,7567,8079,8075,8091,7963,7962,7954,7986,5938,6002,6000,6004,5988,6116,6117,6125,5101,5069,5005,4749,4745,4761,4633,4635,539,531,563,627,626,630,614,742,1766,1764,1772,1740,1676,1164,1160,1176,3224,3096,3097,3353,3385,3449,3451,3443,2419,2403,2531,2530,2534,2502,2438,2950,7046,7054,7070,6942,6940,6936,6968,7032,8056,8057,8049,8033,8161,8163,8167,8135,6087,6023,5767,5775,5791,5663,5662,5658,4634,4666,4730,4728,4720,4704,4832,4833,737,741,709,645,133,141,157,29,1053,1055,1051,1083,1147,1146,1138,1122,3170,3298,3296,3300,3268,3204,3460,3468,2444,2460,2332,2333,2845,2877,2941,2943,7039,7035,7019,7147,7146,7138,7106,7042,8066,7810,7814,7830,7702,7700,7708,7740,5692,5756,5757,5753,5737,5865,5867,5859,4835,4803,4739,4227,4231,4247,4119,4118,22,30,62,126,124,120,104,232,1256,1257,1249,1217,1153,1409,1413,1429,3477,3349,3351,3359,3391,3455,3454,3450,2426,2410,2538,2536,2528,2496,2432,2944,7040,7044,7060,6932,6933,6677,6709,6773,7797,7799,7807,7791,7919,7918,7914,7882,5834,5770,5258,5250,5266,5138,5136,5140,4116,4148,4212,4213,4221,4205,4333,4335,239,235,203,139,395,387,403,275,1299,1298,1302,1334,1398,1396,1404,1388,3436,3564,3565,3561,3529,3465,3977,3969,2945,2961,2833,2835,2839,2871,2935,2934,7030,7038,7022,7150,7148,7144,7112,7048,8072,7816,7808,7824,7696,7697,7185,7217,5169,5233,5235,5239,5495,5623,5622,5630,4606,4590,4526,5038,5034,5002,4874,4872,776,768,784,848,849,853,885,1013,2037,2039,2047,2031,1967,1711,1707,1675,3723,3595,3594,3586,3602,3666,3664,3668,2644,2676,2804,2805,2813,2797,2733,2221,6317,6313,6281,6153,6155,6147,6163,6227,7251,7250,7254,7286,7414,7412,7420,7404,5356,5292,5548,5544,5512,5384,5385,5897,4873,4889,4953,4955,4947,4979,5107,5106,1010,1014,998,934,678,686,654,526,1550,1548,1544,1560,1624,1625,1617,1649,3697,3825,3827,3831,3815,3751,3239,3247,2223,2191,2063,2062,2058,2074,2138,2136,6232,6224,6256,6384,6385,6389,6373,6309,7333,7589,7597,7565,7437,7439,7435,7451,5403,5467,5466,5458,5490,5618,5616,5620,4596,4580,4516,5028,5036,5004,4876,4877,781,525,541,605,607,603,635,763,1787,1786,1778,1762,1698,1186,1190,1158,3206,3078,3076,3084,3100,3164,3165,3161,2137,2169,2297,2299,2291,2275,2211,2467,6563,6567,6535,6407,6406,6414,6430,6494,7518,7516,7512,7544,7672,7673,7665,7649,5601,5537,6049,6053,6021,5893,5895,5903,4879,4895,4959,4958,4954,4986,5114,5112,1016,1008,992,928,672,676,644,516,1540,1541,1029,1045,1109,1111,1119,1151,3199,3327,3326,3322,3306,3242,3498,3490,2466,2434,2306,2304,2308,2324,2388,2389,6485,6493,6525,6653,6655,6651,6635,6571,7595,8107,8099,8067,7939,7938,7942,7958,5910,5974,5972,5980,6012,6140,6141,6137,5113,5097,5033,4777,4769,4737,4609,4611,515,519,535,599,598,606,638,766,1790,1788,1784,1768,1704,1192,1184,1152,3200,3072,3073,3329,3345,3409,3411,3415,2391,2903,3031,3030,3038,3070,3006,2750,6846,6842,6826,6698,6696,6688,6656,6720,7744,7745,7749,7765,7893,7895,7903,7935,5887,5823,5311,5307,5291,5163,5162,5154,4130,4098,4162,4160,4164,4180,4308,4309,213,221,253,189,445,441,425,297,1321,1323,1315,1283,1347,1346,1350,1366,3414,3542,3540,3548,3580,3516,4028,4024,3000,2984,2856,2857,2601,2569,2633,2635,6731,6723,6739,6867,6866,6870,6902,6838,7862,7350,7358,7342,7214,7212,7208,7176,5128,5192,5193,5185,5201,5329,5331,5335,4311,4343,4279,4535,4543,4527,4399,4398,302,298,266,330,328,320,336,464,1488,1489,1493,1525,1461,1973,1981,1965,4013,3885,3887,3883,3851,3915,3914,3906,2882,2898,3026,3024,3028,3060,2996,2740,6836,6844,6828,6700,6701,6189,6157,6221,7245,7247,7243,7259,7387,7386,7378,7410,5362,5298,5554,5558,5542,5414,5412,5420,4396,4364,4428,4429,4425,4441,4569,4571,475,467,499,435,947,951,935,807,1831,1830,1838,1806,1870,1868,1864,1880,3928,4056,4057,4049,4081,4017,3761,3765,2741,2725,2597,2599,2607,2575,2639,2638,6734,6730,6746,6874,6872,6864,6896,6832,7856,7344,7348,7332,7204,7205,7461,7429,5381,5445,5447,5455,5471,5599,5598,5594,4570,4602,4538,5050,5042,5026,4898,4896,800,804,772,836,837,845,861,989,2013,2015,2011,2043,1979,1723,1715,1699,3747,3619,3618,3622,3590,3654,3652,3660,2636,2652,2780,2781,2777,2809,2745,2233,6329,6321,6305,6177,6179,6183,6151,6215,7239,7238,7246,7262,7390,7388,7384,7416,5368,5304,5560,5552,5536,5408,5409,5921,4897,4865,4929,4931,4935,4679,4807,4806,710,718,734,670,158,154,186,58,1082,1080,1072,1056,1120,1121,1125,1093,3141,3269,3271,3279,3295,3231,3487,3483,2459,2491,2363,2362,2354,2338,2402,2400,6496,6500,6468,6596,6597,6605,6621,6557,7581,8093,8089,8121,7993,7995,7987,7971,5923,5987,5986,5990,5958,6086,6084,6092,5068,5084,5020,4764,4760,4792,4664,4665,569,57,41,105,107,99,67,195,1219,1218,1222,1238,1174,1430,1438,1470,3518,3390,3388,3384,3368,3432,3433,3425,2401,2369,2497,2499,2503,2519,2455,2967,7063,7071,7103,6975,6974,6970,6954,7018,8042,8040,8032,8000,8128,8129,8133,8149,6101,6037,5781,5789,5821,5693,5695,5691,4667,4651,4715,4714,4706,4674,4802,4800,704,708,724,660,148,156,188,60,1084,1085,1341,1325,1389,1391,1387,1355,3403,3531,3530,3522,3538,3474,3986,3990,2966,2998,2870,2868,2876,2860,2924,2925,7021,7017,6985,7113,7115,7107,7123,7059,8083,7827,7831,7863,7735,7734,7742,7726,5678,5742,5740,5736,5704,5832,5833,5825,4801,4817,4753,4241,4245,4277,4149,4151,55,63,47,111,110,106,74,202,1226,1224,1216,1232,1168,1424,1428,1460,3508,3380,3381,3893,3877,3941,3943,3951,2927,2895,3023,3022,3018,3034,2970,2714,6810,6802,6834,6706,6704,6708,6692,6756,7780,7781,7789,7757,7885,7887,7883,7899,5851,5787,5275,5267,5299,5171,5170,5174,4150,4134,4198,4196,4204,4172,4300,4301,205,201,217,153,409,401,433,305,1329,1331,1335,1319,1383,1382,1390,1358,3406,3534,3532,3528,3544,3480,3992,3984,2960,2992,2864,2865,2609,2593,2657,2659,6755,6759,6247,6375,6374,6382,6350,6286,7310,7566,7562,7578,7450,7448,7440,7472,5424,5488,5489,5493,5477,5605,5607,5615,4591,4559,4495,5007,5003,5019,4891,4890,794,786,818,882,880,884,868,996,2020,2021,2029,1997,1933,1677,1673,1689,3737,3609,3611,3603,3635,3699,3698,3702,2678,2662,2790,2788,2796,2764,2700,2188,6284,6280,6296,6168,6169,6425,6457,6521,7545,7547,7539,7523,7651,7650,7654,7622,5574,5510,6022,6030,6046,5918,5916,5912,4888,4920,4984,4985,4977,4961,5089,5091,995,999,967,903,647,655,671,543,1567,1566,1562,1594,1658,1656,1648,1632,3680,3808,3809,3813,3781,3717,3205,3213,2189,2205,2077,2079,2075,2107,2171,2170,6266,6258,6242,6370,6368,6372,6340,6276,7300,7556,7564,7580,7452,7453,7965,7997,5949,6013,6015,6011,5995,6123,6122,6114,5090,5058,4994,4738,4742,4758,4630,4628,532,540,572,636,637,633,617,745,1769,1771,1763,1731,1667,1155,1159,1175,3223,3095,3094,3102,3134,3198,3196,3192,2168,2152,2280,2281,2273,2241,2177,2433,6529,6533,6549,6421,6423,6431,6463,6527,7551,7550,7546,7530,7658,7656,7648,7616,5568,5504,6016,6020,6036,5908,5909,5653,4629,4661,4725,4727,4735,4719,4847,4846,750,746,714,650,138,130,146,18,1042,1040,1044,1076,1140,1141,1149,1133,3181,3309,3311,3307,3275,3211,3467,3459,2435,2451,2323,2322,2326,2358,2422,2420,6516,6524,6508,6636,6637,6633,6601,6537,7561,8073,8065,8081,7953,7955,7959,7991,5943,6007,6006,6014,5998,6126,6124,6120,5096,5064,5000,4744,4736,4752,4624,4625,529,17,49,113,115,119,375,503,1527,1526,1534,1518,1454,1966,1962,1930,3978,3850,3848,3840,3856,3920,3921,3925,2901,2933,3061,3063,3071,3055,2991,2735,6831,6827,6795,6667,6666,6658,6674,6738,7762,7760,7764,7796,7924,7925,7933,7917,5869,5805,5293,5289,5257,5129,5131,5123,4099,4115,4179,4178,4182,4214,4342,4340,244,252,236,172,428,424,392,264,1288,1289,1801,1817,1881,1883,1875,1907,3955,4083,4082,4086,4070,4006,3750,3758,2734,2702,2574,2572,2568,2584,2648,2649,6745,6737,6769,6897,6899,6903,6887,6823,7847,7335,7343,7311,7183,7182,7178,7194,5146,5210,5208,5200,5232,5360,5361,5365,4341,4325,4261,4517,4525,4493,4365,4367,271,267,283,347,346,338,370,498,1522,1520,1524,1508,1444,1956,1964,1932,3980,3852,3853,3597,3613,3677,3679,3675,2651,2683,2811,2810,2802,2786,2722,2210,6306,6310,6278,6150,6148,6156,6172,6236,7260,7261,7257,7289,7417,7419,7411,7395,5347,5283,5539,5543,5511,5383,5382,5390,4366,4382,4446,4444,4440,4472,4600,4601,505,497,481,417,929,933,901,773,1797,1799,1807,1823,1887,1886,1882,1914,3962,4090,4088,4080,4064,4000,3744,3748,2724,2692,2564,2565,2053,2069,2133,2135,6231,6239,6271,6399,6398,6394,6378,6314,7338,7594,7586,7554,7426,7424,7428,7444,5396,5460,5461,5469,5501,5629,5631,5627,4603,4587,4523,5035,5027,4995,4867,4866,770,774,790,854,852,860,892,1020,2044,2045,2041,2025,1961,1705,1697,1665,3713,3585,3587,3591,3607,3671,3670,3678,2654,2686,2814,2812,2808,2792,2728,2216,6312,6304,6272,6144,6145,6401,6417,6481,7505,7507,7511,8023,8151,8150,8158,8190,6142,6078,5822,5818,5802,5674,5672,5664,4640,4608,4672,4673,4677,4693,4821,4823,727,735,767,703,191,187,171,43,1067,1066,1058,1026,1090,1088,1092,1108,3156,3284,3285,3293,3325,3261,3517,3513,2489,2473,2345,2347,2339,2307,2371,2370,6466,6470,6486,6614,6612,6620,6652,6588,7612,8124,8120,8104,7976,7977,7721,7689,5641,5705,5707,5699,5715,5843,5842,5846,4822,4854,4790,4278,4286,4270,4142,4140,44,40,8,72,73,65,81,209,1233,1235,1239,1271,1207,1463,1471,1455,3503,3375,3374,3370,3338,3402,3400,3392,2368,2384,2512,2513,2517,2549,2485,2997,7093,7101,7085,6957,6959,6955,6923,6987,8011,8010,8002,8018,8146,8144,8148,8180,6132,6068,5812,5820,5804,5676,5677,5165,4141,4109,4173,4175,4171,4187,4315,4314,218,210,242,178,434,438,422,294,1318,1316,1324,1292,1356,1357,1353,1369,3417,3545,3547,3539,3571,3507,4019,4023,2999,2983,2855,2854,2862,2830,2894,2892,6988,6984,7000,7128,7129,7121,7153,7089,8113,7857,7861,7845,7717,7719,7727,7695,5647,5711,5710,5706,5722,5850,5848,5840,4816,4848,4784,4272,4276,4260,4132,4133,37,293,261,325,327,335,351,479,1503,1502,1498,1530,1466,1978,1970,1954,4002,3874,3872,3876,3844,3908,3909,3917,2893,2909,3037,3039,3035,3067,3003,2747,6843,6835,6819,6691,6690,6694,6662,6726,7750,7748,7756,7772,7900,7901,7897,7929,5881,5817,5305,5297,5281,5153,5155,5159,4135,4103,4167,4166,4174,4190,4318,4316,220,216,248,184,440,432,416,288,1312,1313,1825,1793,1857,1859,1863,1607,3655,3783,3782,3790,3806,3742,3230,3226,2202,2234,2106,2104,2096,2080,2144,2145,6241,6245,6213,6341,6343,6351,6367,6303,7327,7583,7579,7611,7483,7482,7474,7458,5410,5474,5472,5476,5444,5572,5573,5581,4557,4573,4509,5021,5017,5049,4921,4923,827,819,803,867,866,870,838,966,1990,1988,1996,2012,1948,1692,1688,1720,3768,3640,3641,3129,3113,3177,3179,3171,2147,2115,2243,2242,2246,2262,2198,2454,6550,6558,6590,6462,6460,6456,6440,6504,7528,7529,7521,7489,7617,7619,7623,7639,5591,5527,6039,6047,6079,5951,5950,5946,4922,4906,4970,4968,4960,4928,5056,5057,961,965,981,917,661,669,701,573,1597,1599,1595,1579,1643,1642,1634,1602,3650,3778,3776,3780,3796,3732,3220,3228,2204,2236,2108,2109,2365,2349,2413,2415,6511,6507,6475,6603,6602,6594,6610,6546,7570,8082,8086,8118,7990,7988,7996,7980,5932,5996,5997,5993,5961,6089,6091,6083,5059,5075,5011,4755,4759,4791,4663,4662,566,574,558,622,620,616,584,712,1736,1737,1729,1745,1681,1169,1173,1205,3253,3125,3127,3135,3119,3183,3182,3178,2154,2122,2250,2248,2240,2256,2192,2448,6544,6548,6580,6452,6453,6965,6949,7013,8037,8039,8047,8015,8143,8142,8138,8154,6106,6042,5786,5778,5810,5682,5680,5684,4660,4644,4708,4709,4717,4685,4813,4815,719,715,731,667,155,147,179,51,1075,1074,1078,1062,1126,1124,1132,1100,3148,3276,3277,3273,3289,3225,3481,3473,2449,2481,2353,2355,2359,2343,2407,2406,6502,6510,6478,6606,6604,6600,6616,6552,7576,8088,8080,8112,7984,7985,7729,7713,5665,5729,5731,5735,5223,5351,5350,5358,4334,4302,4238,4494,4490,4506,4378,4376,280,272,304,368,369,373,357,485,1509,1511,1519,1487,1423,1935,1931,1947,3995,3867,3866,3858,3890,3954,3952,3956,2932,2916,3044,3045,3053,3021,2957,2701,6797,6793,6809,6681,6683,6675,6707,6771,7795,7794,7798,7782,7910,7908,7916,7884,5836,5772,5260,5256,5272,5144,5145,5401,4377,4409,4473,4475,4467,4451,4579,4578,482,486,454,390,902,910,926,798,1822,1820,1816,1848,1912,1913,1905,1889,3937,4065,4067,4071,4039,3975,3719,3727,2703,2719,2591,2590,2586,2618,2682,2680,6776,6768,6752,6880,6881,6885,6853,6789,7813,7301,7309,7325,7197,7199,7195,7227,5179,5243,5242,5234,5218,5346,5344,5348,4324,4292,4228,4484,4492,4508,4380,4381,285,797,829,893,895,891,875,1003,2027,2026,2018,1986,1922,1666,1670,1686,3734,3606,3604,3612,3644,3708,3709,3705,2681,2665,2793,2795,2787,2755,2691,2179,6275,6279,6295,6167,6166,6174,6206,6270,7294,7292,7288,7272,7400,7401,7393,7361,5313,5249,5505,5509,5525,5397,5399,5407,4383,4415,4479,4478,4474,4458,4586,4584,488,480,448,384,896,900,916,788,1812,1813,1557,1589,1653,1655,1663,1647,3695,3823,3822,3818,3786,3722,3210,3202,2178,2194,2066,2064,2068,2100,2164,2165,6261,6269,6253,6381,6383,6379,6347,6283,7307,7563,7555,7571,7443,7442,7446,7478,5430,5494,5492,5500,5484,5612,5613,5609,4585,4553,4489,5001,4993,5009,4881,4883,787,791,823,887,886,894,878,1006,2030,2028,2024,1992,1928,1672,1664,1680,3728,3600,3601,3089,3121,3185,3187,3191,2167,2423,2551,2550,2558,2542,2478,2990,7086,7082,7050,6922,6920,6912,6928,6992,8016,8017,8021,8053,8181,8183,8191,8175,6127,6063,5807,5803,5771,5643,5642,5634,4610,4626,4690,4688,4692,4724,4852,4853,757,765,749,685,173,169,137,9,1033,1035,1027,1043,1107,1106,1110,1142,3190,3318,3316,3324,3308,3244,3500,3496,2472,2440,2312,2313,2825,2841,2905,2907,7003,6995,7027,7155,7154,7158,7142,7078,8102,7846,7854,7822,7694,7692,7688,7704,5656,5720,5721,5713,5745,5873,5875,5879,4855,4839,4775,4263,4271,4239,4111,4110,14,10,26,90,88,80,112,240,1264,1265,1269,1253,1189,1445,1453,1421,3469,3341,3343,3339,3355,3419,3418,3410,2386,2418,2546,2544,2548,2532,2468,2980,7076,7084,7052,6924,6925,6669,6685,6749,7773,7775,7771,7803,7931,7930,7922,7906,5858,5794,5282,5286,5254,5126,5124,5132,4108,4124,4188,4189,4185,4217,4345,4347,251,243,227,163,419,423,391,263,1287,1286,1294,1310,1374,1372,1368,1400,3448,3576,3577,3569,3553,3489,4001,4005,2981,2949,2821,2823,2831,2847,2911,2910,7006,7002,7034,7162,7160,7152,7136,7072,8096,7840,7844,7812,7684,7685,7173,7189,5141,5205,5207,5215,5247,5375,5374,5370,4346,4330,4266,4522,4514,4482,4354,4352,256,260,276,340,341,349,381,509,1533,1535,1531,1515,1451,1963,1955,1923,3971,3843,3842,3846,3862,3926,3924,3932,2908,2940,3068,3069,3065,3049,2985,2729,6825,6817,6785,6657,6659,6663,6679,6743,7767,7766,7774,7806,7934,7932,7928,7912,5864,5800,5288,5280,5248,5120,5121,5377,4353,4369,4433,4435,4439,4951,5079,5078,982,990,1022,958,702,698,682,554,1578,1576,1568,1536,1600,1601,1605,1621,3669,3797,3799,3807,3839,3775,3263,3259,2235,2219,2091,2090,2082,2050,2114,2112,6208,6212,6228,6356,6357,6365,6397,6333,7357,7613,7609,7593,7465,7467,7459,7427,5379,5443,5442,5446,5462,5590,5588,5596,4572,4604,4540,5052,5048,5032,4904,4905,809,553,521,585,587,579,595,723,1747,1746,1750,1782,1718,1206,1214,1198,3246,3118,3116,3112,3080,3144,3145,3137,2113,2129,2257,2259,2263,2295,2231,2487,6583,6591,6575,6447,6446,6442,6410,6474,7498,7496,7488,7504,7632,7633,7637,7669,5621,5557,6069,6077,6061,5933,5935,5931,4907,4875,4939,4938,4930,4946,5074,5072,976,980,1012,948,692,700,684,556,1580,1581,1069,1037,1101,1103,1099,1115,3163,3291,3290,3282,3314,3250,3506,3510,2486,2470,2342,2340,2348,2316,2380,2381,6477,6473,6489,6617,6619,6611,6643,6579,7603,8115,8119,8103,7975,7974,7982,7950,5902,5966,5964,5960,5976,6104,6105,6097,5073,5105,5041,4785,4789,4773,4645,4647,551,559,527,591,590,586,602,730,1754,1752,1744,1776,1712,1200,1204,1188,3236,3108,3109,3365,3333,3397,3399,3407,2383,2399,2527,2526,2522,2554,2490,3002,7098,7090,7074,6946,6944,6948,6916,6980,8004,8005,8013,8029,8157,8159,8155,8187,6139,6075,5819,5811,5795,5667,5666,5670,4646,4614,4678,4676,4684,4700,4828,4829,733,729,761,697,185,177,161,33,1057,1059,1063,1031,1095,1094,1102,1118,3166,3294,3292,3288,3320,3256,3512,3504,2480,2464,2336,2337,2849,2817,2881,2883,6979,6983,6727,6855,6854,6862,6878,6814,7838,7326,7322,7354,7226,7224,7216,7200,5152,5216,5217,5221,5189,5317,5319,5327,4303,4319,4255,4511,4507,4539,4411,4410,314,306,290,354,352,356,324,452,1476,1477,1485,1501,1437,1949,1945,1977,4025,3897,3899,3891,3875,3939,3938,3942,2918,2886,3014,3012,3020,3036,2972,2716,6812,6808,6840,6712,6713,6201,6185,6249,7273,7275,7267,7235,7363,7362,7366,7382,5334,5270,5526,5534,5566,5438,5436,5432,4408,4392,4456,4457,4449,4417,4545,4547,451,455,471,407,919,927,959,831,1855,1854,1850,1834,1898,1896,1888,1856,3904,4032,4033,4037,4053,3989,3733,3741,2717,2749,2621,2623,2619,2603,2667,2666,6762,6754,6722,6850,6848,6852,6868,6804,7828,7316,7324,7356,7228,7229,7485,7469,5421,5485,5487,5483,5451,5579,5578,5570,4546,4562,4498,5010,5014,5046,4918,4916,820,828,812,876,877,873,841,969,1993,1995,1987,2003,1939,1683,1687,1719,3767,3639,3638,3646,3630,3694,3692,3688,2664,2632,2760,2761,2753,2769,2705,2193,6289,6293,6325,6197,6199,6207,6191,6255,7279,7278,7274,7242,7370,7368,7360,7376,5328,5264,5520,5524,5556,5428,5429,5941,4917,4901,4965,4967,4975,4943,5071,5070,974,970,986,922,666,658,690,562,1586,1584,1588,1572,1636,1637,1645,1613,3661,3789,3791,3787,3803,3739,3227,3219,2195,2227,2099,2098,2102,2086,2150,2148,6244,6252,6220,6348,6349,6345,6361,6297,7321,7577,7569,7601,7473,7475,7479,7463,5415,5479,5478,5486,5454,5582,5580,5576,4552,4568,4504,5016,5008,5040,4912,4913,817,561,545,609,611,615,103,231,1255,1254,1262,1230,1166,1422,1418,1434,3482,3354,3352,3344,3376,3440,3441,3445,2421,2405,2533,2535,2543,2511,2447,2959,7055,7051,7067,6939,6938,6930,6962,7026,8050,8048,8052,8036,8164,8165,8173,8141,6093,6029,5773,5769,5785,5657,5659,5651,4627,4659,4723,4722,4726,4710,4838,4836,740,748,716,652,140,136,152,24,1048,1049,1305,1337,1401,1403,1395,1379,3427,3555,3554,3558,3526,3462,3974,3982,2958,2974,2846,2844,2840,2872,2936,2937,7033,7025,7009,7137,7139,7143,7111,7047,8071,7815,7823,7839,7711,7710,7706,7738,5690,5754,5752,5744,5728,5856,5857,5861,4837,4805,4741,4229,4237,4253,4125,4127,31,27,59,123,122,114,98,226,1250,1248,1252,1220,1156,1412,1420,1436,3484,3356,3357,3869,3901,3965,3967,3963,2939,2923,3051,3050,3042,3010,2946,2690,6786,6790,6806,6678,6676,6684,6716,6780,7804,7805,7801,7785,7913,7915,7907,7875,5827,5763,5251,5255,5271,5143,5142,5150,4126,4158,4222,4220,4216,4200,4328,4329,233,225,193,129,385,389,405,277,1301,1303,1311,1343,1407,1406,1402,1386,3434,3562,3560,3552,3520,3456,3968,3972,2948,2964,2836,2837,2581,2613,2677,2679,6775,6783,6767,6895,6894,6890,6858,6794,7818,7306,7298,7314,7186,7184,7188,7220,5172,5236,5237,5245,5229,5357,5359,5355,4331,4299,4235,4491,4483,4499,4371,4370,274,278,310,374,372,380,364,492,1516,1517,1513,1481,1417,1929,1921,1937,3985,3857,3859,3863,3895,3959,3958,3966,2942,2926,3054,3052,3048,3016,2952,2696,6792,6784,6800,6672,6673,6161,6193,6257,7281,7283,7287,7543,7671,7670,7678,7662,5614,5550,6062,6058,6026,5898,5896,5888,4864,4880,4944,4945,4949,4981,5109,5111,1015,1023,1007,943,687,683,651,523,1547,1546,1538,1554,1618,1616,1620,1652,3700,3828,3829,3837,3821,3757,3245,3241,2217,2185,2057,2059,2051,2067,2131,2130,6226,6230,6262,6390,6388,6396,6380,6316,7340,7596,7592,7560,7432,7433,7945,7961,5913,5977,5979,5971,6003,6131,6130,6134,5110,5094,5030,4774,4782,4750,4622,4620,524,520,536,600,601,593,625,753,1777,1779,1783,1767,1703,1191,1199,1167,3215,3087,3086,3082,3098,3162,3160,3152,2128,2160,2288,2289,2293,2277,2213,2469,6565,6573,6541,6413,6415,6411,6427,6491,7515,7514,7506,7538,7666,7664,7668,7652,5604,5540,6052,6060,6028,5900,5901,5645,4621,4637,4701,4703,4699,4731,4859,4858,762,754,738,674,162,166,134,6,1030,1028,1036,1052,1116,1117,1113,1145,3193,3321,3323,3315,3299,3235,3491,3495,2471,2439,2311,2310,2318,2334,2398,2396,6492,6488,6520,6648,6649,6641,6625,6561,7585,8097,8101,8069,7941,7943,7951,7967,5919,5983,5982,5978,6010,6138,6136,6128,5104,5088,5024,4768,4772,4740,4612,4613,517,5,21,85,87,95,127,255,1279,1278,1274,1258,1194,1450,1442,1410,3458,3330,3328,3332,3348,3412,3413,3421,2397,2429,2557,2559,2555,2539,2475,2987,7083,7075,7043,6915,6914,6918,6934,6998,8022,8020,8028,8060,8188,8189,8185,8169,6121,6057,5801,5793,5761,5633,5635,5639,4615,4631,4695,4694,4702,4734,4862,4860,764,760,744,680,168,160,128);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment