{"trustable":true,"sections":[{"title":"","value":{"format":"HTML","content":"\u003cp\u003eThe Light Switching Game is played on a 1000 × 1000 × 1000 cube of cells with a light in each cell, as Figure.1 shows. Initially, most of the lights are off while exactly \u003ci\u003eN\u003c/i\u003e lights are on. Two players take moves alternately. A move consists of switching the lights at the corners of a cuboid, i.e. (\u003ci\u003ex\u003c/i\u003e\u003csub\u003e1\u003c/sub\u003e,\u003ci\u003ey\u003c/i\u003e\u003csub\u003e1\u003c/sub\u003e,\u003ci\u003ez\u003c/i\u003e\u003csub\u003e1\u003c/sub\u003e), (\u003ci\u003ex\u003c/i\u003e\u003csub\u003e1\u003c/sub\u003e,\u003ci\u003ey\u003c/i\u003e\u003csub\u003e1\u003c/sub\u003e,\u003ci\u003ez\u003c/i\u003e\u003csub\u003e2\u003c/sub\u003e), (\u003ci\u003ex\u003c/i\u003e\u003csub\u003e1\u003c/sub\u003e,\u003ci\u003ey\u003c/i\u003e\u003csub\u003e2\u003c/sub\u003e,\u003ci\u003ez\u003c/i\u003e\u003csub\u003e1\u003c/sub\u003e), (\u003ci\u003ex\u003c/i\u003e\u003csub\u003e1\u003c/sub\u003e,\u003ci\u003ey\u003c/i\u003e\u003csub\u003e2\u003c/sub\u003e,\u003ci\u003ez\u003c/i\u003e\u003csub\u003e2\u003c/sub\u003e), (\u003ci\u003ex\u003c/i\u003e\u003csub\u003e2\u003c/sub\u003e,\u003ci\u003ey\u003c/i\u003e\u003csub\u003e1\u003c/sub\u003e,\u003ci\u003ez\u003c/i\u003e\u003csub\u003e1\u003c/sub\u003e), (\u003ci\u003ex\u003c/i\u003e\u003csub\u003e2\u003c/sub\u003e,\u003ci\u003ey\u003c/i\u003e\u003csub\u003e1\u003c/sub\u003e,\u003ci\u003ez\u003c/i\u003e\u003csub\u003e2\u003c/sub\u003e), (\u003ci\u003ex\u003c/i\u003e\u003csub\u003e2\u003c/sub\u003e,\u003ci\u003ey\u003c/i\u003e\u003csub\u003e2\u003c/sub\u003e,\u003ci\u003ez\u003c/i\u003e\u003csub\u003e1\u003c/sub\u003e), (\u003ci\u003ex\u003c/i\u003e\u003csub\u003e2\u003c/sub\u003e,\u003ci\u003ey\u003c/i\u003e\u003csub\u003e2\u003c/sub\u003e,\u003ci\u003ez\u003c/i\u003e\u003csub\u003e2\u003c/sub\u003e) where 1 ≤ \u003ci\u003ex\u003c/i\u003e\u003csub\u003e1 \u003c/sub\u003e≤\u003ci\u003e x\u003c/i\u003e\u003csub\u003e2\u003c/sub\u003e ≤ 1000, 1 ≤\u003ci\u003ey\u003c/i\u003e\u003csub\u003e1 \u003c/sub\u003e≤\u003ci\u003e y\u003c/i\u003e\u003csub\u003e2\u003c/sub\u003e ≤ 1000, 1 ≤\u003ci\u003ez\u003c/i\u003e\u003csub\u003e1 \u003c/sub\u003e≤\u003ci\u003e z\u003c/i\u003e\u003csub\u003e2\u003c/sub\u003e ≤ 1000 and the light at the corner (\u003ci\u003ex\u003c/i\u003e\u003csub\u003e2\u003c/sub\u003e,\u003ci\u003ey\u003c/i\u003e\u003csub\u003e2\u003c/sub\u003e,\u003ci\u003ez\u003c/i\u003e\u003csub\u003e2\u003c/sub\u003e) must be on (and turned off after the move). Notice the cuboid is possibly degenerated to a rectangle, a line or even a single cell so that the player may also switching four, two or one besides eight lights in a move. The player loses the game when he can not take a move.\u003c/p\u003e\u003cp\u003e\u003c/p\u003e\u003ccenter\u003e\u003cimg src\u003d\"CDN_BASE_URL/8f32686621aad732920aa976cfafe3cc?v\u003d1714732486\"\u003e\u003cbr\u003eFigure.1\u003c/center\u003e\u003cp\u003e\u003c/p\u003e\u003cp\u003eYou will find out whether the second player can win if both players play optimally.\u003c/p\u003e"}},{"title":"Input","value":{"format":"HTML","content":"There are multiple test cases.\r\u003cbr\u003eEvery test case starts with one line containing a single number \u003ci\u003eN\u003c/i\u003e indicating the number of lights which is initially on. (\u003ci\u003eN\u003c/i\u003e ≤ 100)\r\u003cbr\u003eEach of the next \u003ci\u003eN\u003c/i\u003e lines contains the coordinates (\u003ci\u003ex\u003c/i\u003e, \u003ci\u003ey\u003c/i\u003e, \u003ci\u003ez\u003c/i\u003e) (1 ≤ \u003ci\u003ex\u003c/i\u003e, \u003ci\u003ey\u003c/i\u003e, \u003ci\u003ez\u003c/i\u003e ≤ 1000) showing that the light at this position is on initially."}},{"title":"Output","value":{"format":"HTML","content":"One line for each test case which contains \"Yes\" or \"No\" indicating whether the second player can win the game."}},{"title":"Sample","value":{"format":"HTML","content":"\u003ctable class\u003d\u0027vjudge_sample\u0027\u003e\n\u003cthead\u003e\n \u003ctr\u003e\n \u003cth\u003eInput\u003c/th\u003e\n \u003cth\u003eOutput\u003c/th\u003e\n \u003c/tr\u003e\n\u003c/thead\u003e\n\u003ctbody\u003e\n \u003ctr\u003e\n \u003ctd\u003e\u003cpre\u003e4\r\n5 11 30\r\n5 19 19\r\n23 15 6\r\n2 26 16\r\n3\r\n9 20 9\r\n8 1 28\r\n30 22 26\r\n\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003eYes\r\nNo\r\n\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n"}}]}