data = [ (799,207,745,277), (745,277,694,343), (694,343,632,423), (632,423,576,496), (576,496,559,517), (559,517,556,522), (556,522,546,523), (546,523,514,517), (514,517,474,508), (474,508,446,502), (446,502,412,494), (412,494,371,485), (371,485,335,477), (335,477,302,470), (302,470,261,460), (261,460,255,465), (255,465,257,480), (257,480,259,483), (187,472,196,475), (196,475,208,476), (208,476,219,479), (219,479,258,487), (258,487,300,496), (300,496,341,505), (341,505,388,514), (388,514,439,524), (439,524,487,534), (487,534,494,536), (494,536,503,537), (503,537,509,537), (382,59,367,69), (367,69,357,76), (357,76,343,85), (343,85,341,85), (341,85,331,89), (331,89,320,101), (320,101,316,108), (316,108,314,113), (314,113,309,136), (309,136,310,141), (310,141,310,150), (310,150,310,171), (310,171,310,189), (310,189,309,195), (309,195,313,201), (313,201,319,213), (319,213,322,235), (322,235,321,243), (321,243,318,244), (318,244,310,245), (310,245,287,245), (287,245,266,247), (266,247,252,248), (252,248,223,255), (223,255,216,262), (216,262,201,273), (201,273,188,273), (188,273,178,274), (178,274,165,283), (165,283,144,304), (144,304,118,324), (118,324,113,329), (783,537,779,537), (779,537,770,537), (770,537,761,535), (761,535,745,533), (745,533,720,528), (720,528,691,523), (691,523,666,519), (666,519,647,516), (647,516,626,512), (626,512,602,508), (602,508,597,508), (597,508,585,513), (585,513,577,523), (405,257,408,262), (408,262,418,258), (418,258,430,245), (430,245,438,232), (438,232,438,226), (438,226,438,222), (438,222,440,217), (440,217,437,202), (437,202,436,196), (436,196,432,183), (432,183,422,180), (422,180,394,185), (394,185,387,184), (387,184,372,190), (372,190,360,197), (360,197,350,208), (350,208,341,222), (341,222,333,247), (333,247,327,262), (327,262,319,274), (319,274,314,278), (314,278,301,284), (301,284,244,305), (244,305,237,309), (793,183,774,208), (774,208,706,296), (706,296,656,360), (656,360,582,455), (582,455,541,508), (541,508,543,516), (543,516,547,520), (547,520,550,523), (564,190,564,186), (564,186,564,181), (564,181,562,165), (562,165,561,154), (561,154,556,142), (556,142,552,135), (552,135,552,133), (552,133,539,125), (539,125,526,122), (526,122,519,122), (519,122,516,122), (516,122,506,120), (506,120,491,121), (491,121,475,125), (475,125,470,127), (470,127,460,131), (460,131,454,133), (454,133,440,142), (440,142,427,155), (427,155,421,160), (421,160,417,163), (557,522,568,523), (568,523,589,525), (589,525,607,527), (607,527,631,530), (631,530,648,532), (648,532,666,534), (666,534,682,535), (682,535,689,537), (689,537,692,537), (692,537,714,537), (283,375,264,355), (264,355,250,346), (250,346,238,327), (238,327,237,313), (237,313,237,302), (237,302,237,299), (237,299,234,297), (234,297,229,299), (229,299,213,305), (213,305,201,311), (201,311,165,325), (165,325,157,324), (157,324,142,327), (142,327,127,331), (127,331,125,331), (125,331,116,329), (116,329,105,333), (105,333,93,341), (93,341,83,345), (83,345,64,356), (64,356,32,402), (32,402,30,422), (30,422,31,438), (31,438,31,441), (543,329,550,336), (550,336,551,339), (551,339,551,352), (551,352,551,378), (551,378,546,403), (546,403,543,415), (543,415,539,437), (539,437,538,459), (576,247,578,247), (578,247,590,232), (590,232,591,230), (591,230,597,220), (597,220,600,199), (600,199,600,193), (600,193,601,180), (601,180,601,177), (601,177,600,165), (600,165,601,162), (601,162,604,154), (604,154,606,133), (606,133,606,128), (606,128,605,123), (605,123,603,119), (603,119,596,115), (596,115,601,109), (601,109,599,102), (599,102,595,96), (595,96,591,87), (591,87,589,84), (589,84,586,77), (586,77,581,67), (581,67,571,65), (571,65,568,63), (568,63,562,58), (562,58,552,51), (552,51,550,49), (550,49,541,42), (541,42,529,32), (529,32,525,32), (525,32,512,32), (512,32,501,28), (501,28,493,25), (493,25,488,23), (488,23,465,22), (465,22,458,21), (458,21,454,22), (454,22,437,28), (437,28,431,34), (431,34,421,42), (421,42,402,49), (402,49,393,52), (393,52,382,59), (440,221,451,225), (451,225,453,226), (453,226,470,230), (470,230,472,238), (472,238,461,245), (461,245,432,262), (432,262,418,274), (418,274,405,289), (405,289,383,311), (383,311,380,312), (380,312,376,314), (376,314,368,319), (368,319,357,327), (357,327,342,336), (342,336,332,340), (332,340,330,339), (653,363,647,359), (647,359,636,351), (636,351,630,346), (630,346,620,339), (620,339,609,334), (609,334,594,326), (594,326,574,311), (574,311,565,307), (565,307,559,303), (437,195,448,194), (448,194,476,186), (476,186,475,176), (475,176,467,174), (467,174,450,168), (450,168,431,166), (431,166,410,170), (410,170,395,177), (395,177,390,184), (391,402,392,405), (392,405,406,416), (406,416,450,427), (450,427,478,415), (478,415,489,415), (489,415,509,432), (509,432,515,442), (515,442,527,449), (527,449,529,451), (529,451,538,460), (554,142,550,143), (550,143,540,143), (540,143,521,145), (521,145,503,145), (503,145,476,142), (476,142,465,142), (484,256,463,280), (463,280,448,296), (448,296,446,303), (446,303,441,324), (441,324,436,340), (436,340,435,342), (328,343,324,373), (324,373,312,402), (312,402,311,406), (311,406,315,406), (315,406,334,405), (334,405,367,403), (367,403,388,401), (388,401,406,400), (406,400,407,400), (407,400,423,398), (423,398,426,398), (426,398,436,400), (436,400,459,406), (459,406,465,403), (465,403,493,380), (493,380,508,370), (508,370,521,361), (521,361,526,355), (526,355,533,345), (533,345,543,329), (543,329,543,327), (543,327,560,298), (560,298,570,273), (570,273,573,258), (573,258,571,238), (571,238,570,235), (330,340,326,343), (326,343,316,349), (316,349,286,374), (286,374,277,384), (277,384,249,417), (249,417,218,458), (218,458,217,459), (375,317,384,342), (384,342,388,357), (388,357,398,381), (398,381,399,384), (399,384,406,394), (406,394,409,399), (1,435,31,441), (31,441,49,445), (49,445,67,449), (67,449,85,452), (85,452,121,460), (121,460,156,467), (156,467,183,471), (183,471,196,470), (196,470,208,476), (570,234,583,216), (583,216,574,196), (574,196,530,196), (530,196,528,229), (528,229,570,235), (118,406,107,406), (107,406,78,422), (78,422,69,446), (69,446,68,448), (106,20,97,25), (97,25,89,45), (89,45,91,55), (91,55,98,62), (98,62,107,64), (107,64,112,54), (112,54,102,46), (427,351,437,360), (437,360,443,364), (443,364,465,376), (465,376,468,377), (468,377,487,379), (487,379,491,381), (407,401,417,407), (417,407,439,414), (439,414,467,411), (467,411,470,408), (526,277,531,297), (531,297,527,310), (527,310,525,327), (525,327,526,342), (152,21,148,20), (148,20,135,45), (135,45,148,59), (148,59,163,56), (223,480,221,469), (221,469,195,435), (195,435,171,418), (171,418,141,407), (141,407,122,405), (122,405,118,406), (118,406,111,416), (111,416,122,424), (122,424,125,427), (125,427,150,457), (150,457,151,466), (172,430,161,420), (161,420,145,420), (145,420,142,433), (142,433,156,450), (156,450,160,467), (543,159,535,160), (535,160,514,158), (514,158,486,157), (486,157,481,157), (507,306,498,302), (498,302,479,301), (479,301,474,301), (474,301,457,305), (457,305,468,312), (468,312,489,320), (489,320,491,321), (491,321,510,314), (510,314,515,313), (271,11,267,7), (267,7,259,12), (259,12,258,22), (258,22,263,37), (263,37,260,43), (260,43,250,46), (376,204,397,207), (397,207,415,210), (415,210,420,216), (420,216,422,238), (422,238,420,243), (420,243,398,256), (398,256,388,253), (805,13,794,37), (794,37,787,38), (787,38,779,27), (779,27,775,21), (559,226,551,217), (551,217,546,217), (546,217,533,221), (533,221,538,227), (538,227,541,228), (541,228,553,222), (553,222,554,221), (51,18,52,31), (52,31,53,63), (53,63,54,64), (687,5,680,27), (680,27,685,33), (685,33,693,31), (693,31,696,31), (480,181,487,183), (487,183,500,203), (500,203,485,227), (485,227,474,232), (836,28,833,34), (833,34,839,48), (839,48,833,56), (833,56,823,54), (575,8,570,22), (570,22,567,32), (567,32,571,37), (571,37,582,35), (609,35,614,34), (614,34,626,26), (626,26,627,15), (627,15,601,10), (601,10,593,17), (593,17,589,17), (256,46,259,59), (259,59,256,70), (256,70,261,77), (261,77,268,78), (833,28,829,27), (829,27,827,23), (827,23,833,14), (833,14,835,7), (835,7,830,1), (830,1,827,4), (651,14,649,26), (649,26,650,42), (650,42,652,49), (187,24,188,36), (188,36,190,61), (318,69,310,46), (310,46,304,27), (304,27,300,23), (300,23,297,28), (297,28,293,58), (293,58,294,70), (544,167,519,166), (519,166,512,167), (539,16,535,16), (535,16,520,28), (520,28,531,53), (531,53,541,54), (541,54,547,49), (487,93,488,82), (488,82,476,65), (476,65,473,63), (385,247,388,256), (388,256,388,268), (388,268,388,286), (388,286,379,310), (379,310,379,312), (238,19,228,11), (228,11,217,16), (217,16,216,19), (216,19,218,33), (218,33,221,45), (221,45,224,54), (724,13,724,27), (724,27,724,43), (724,43,725,45), (192,450,186,448), (186,448,171,432), (171,432,182,431), (182,431,192,440), (192,440,193,443), (193,443,197,462), (197,462,197,470), (356,22,352,38), (352,38,342,66), (393,142,365,142), (479,302,488,306), (488,306,507,307), (507,307,517,308), (517,308,521,309), (519,309,511,320), (511,320,492,322), (508,170,510,181), (510,181,510,195), (201,21,197,17), (197,17,189,19), (189,19,176,21), (176,21,174,22), (529,75,509,94), (509,94,511,97), (585,21,582,27), (582,27,584,50), (584,50,585,59), (502,277,485,272), (485,272,478,272), (411,96,429,112), (429,112,433,116), (322,282,338,299), (338,299,340,301), (416,13,412,27), (412,27,411,31), (411,31,415,36), (415,36,426,34), (577,116,564,118), (564,118,560,123), (330,24,346,33), (346,33,351,37), (74,65,48,66), (48,66,38,68), (467,14,453,50), (453,50,451,58), (449,218,462,213), (462,213,469,212), (469,212,475,219), (475,219,473,225), (473,225,470,225), (470,225,464,226), (433,103,441,110), (441,110,448,122), (68,18,52,18), (52,18,45,17), (45,17,39,18), (39,18,31,19), (471,391,468,392), (468,392,451,401), (490,215,477,212), (477,212,471,213), (454,87,468,99), (468,99,470,104), (491,52,469,52), (771,9,772,13), (772,13,773,24), (773,24,766,38), (742,43,719,48), (719,48,712,49), (528,262,532,267), (532,267,530,274), (530,274,519,278), (519,278,515,280), (667,12,654,13), (654,13,642,12), (642,12,638,12), (544,90,533,99), (533,99,529,102), (702,20,699,22), (699,22,697,38), (697,38,700,46), (607,21,609,50), (445,16,458,36), (500,197,517,198), (517,198,524,201), (502,176,502,170), (502,170,496,163), (462,381,451,394), (429,13,428,24), (428,24,427,41), (736,11,725,12), (725,12,718,12), (718,12,715,12), (554,524,555,535), (555,535,555,537), (482,412,467,406), (467,406,464,405), (219,34,229,36), (427,41,427,53), (401,60,376,60), (376,60,360,61), (115,43,107,47), (454,218,457,221), (457,221,461,225), (383,236,390,243), (406,235,392,242), (392,242,386,247), (396,229,397,237), (522,174,522,183), (293,45,310,46) ]