{"trustable":true,"prependHtml":"\u003cstyle type\u003d\u0027text/css\u0027\u003e\n .input, .output {\n border: 1px solid #888888;\n }\n .output {\n margin-bottom: 1em;\n position: relative;\n top: -1px;\n }\n .output pre, .input pre {\n background-color: #EFEFEF;\n line-height: 1.25em;\n margin: 0;\n padding: 0.25em;\n }\n \u003c/style\u003e\n \u003clink rel\u003d\"stylesheet\" href\u003d\"//codeforces.org/s/96598/css/problem-statement.css\" type\u003d\"text/css\" /\u003e\u003cscript\u003e window.katexOptions \u003d { disable: true }; \u003c/script\u003e\n\u003cscript type\u003d\"text/x-mathjax-config\"\u003e\n MathJax.Hub.Config({\n tex2jax: {\n inlineMath: [[\u0027$$$\u0027,\u0027$$$\u0027], [\u0027$\u0027,\u0027$\u0027]],\n displayMath: [[\u0027$$$$$$\u0027,\u0027$$$$$$\u0027], [\u0027$$\u0027,\u0027$$\u0027]]\n }\n });\n\u003c/script\u003e\n\u003cscript type\u003d\"text/javascript\" async src\u003d\"https://mathjax.codeforces.org/MathJax.js?config\u003dTeX-AMS_HTML-full\"\u003e\u003c/script\u003e","sections":[{"title":"","value":{"format":"HTML","content":"\u003cp\u003eUsing marbles as a currency didn\u0027t go so well in CubicĂ´nia. In an attempt to make it up to his friends after stealing their marbles, the Emperor decided to invite them to a game night in his palace.\u003c/p\u003e\u003cp\u003eOf course, the game uses marbles, since the Emperor needs to find some use for so many of them. $$$N$$$ marbles are scattered in a board whose lines are numbered from $$$0$$$ through $$$L$$$ and the columns numbered from $$$0$$$ through $$$C$$$. Players alternate turns. In his turn, a player must choose one of the marbles and move it. The first player to move a marble to position $$$(0, 0)$$$ is the winner. The movements are limited so the game could be more interesting; otherwise, the first player could just move a marble to position $$$(0, 0)$$$ and win. A movement consists in choosing an integer $$$u$$$ greater than $$$0$$$ and a ball, whose location is denoted by $$$(l, c)$$$, and move it to one of the following positions, as long as it is inside the board:\u003c/p\u003e\u003cul\u003e \u003cli\u003e $$$(l - u, c)$$$ or; \u003c/li\u003e\u003cli\u003e $$$(l, c - u)$$$ or; \u003c/li\u003e\u003cli\u003e $$$(l - u, c - u)$$$. \u003c/li\u003e\u003c/ul\u003e\u003cp\u003eNote that more than one marble can occupy the same position on the board.\u003c/p\u003e\u003cp\u003eAs the Emperor doesn\u0027t like to lose, you should help him determine which games he should attend. Also, as expected, the Emperor always take the first turn when playing. Assuming both players act optimally, you are given the initial distribution of the marbles, and should find if it is possible for the Emperor to win if he chooses to play.\u003c/p\u003e"}},{"title":"Input","value":{"format":"HTML","content":"\u003cp\u003eThe first line contains an integer $$$N$$$ ($$$1 \\leq N \\leq 1000$$$). Each of the following $$$N$$$ rows contains two integers $$$l_i$$$ and $$$c_i$$$ indicating on which row and column the $$$i$$$-th marble is in ($$$1 \\leq l_i, c_i \\leq 100$$$).\u003c/p\u003e"}},{"title":"Output","value":{"format":"HTML","content":"\u003cp\u003eYour program should print a single line containing the character \u003cspan class\u003d\"tex-font-style-tt\"\u003eY\u003c/span\u003e if it is possible for the Emperor to win the game or \u003cspan class\u003d\"tex-font-style-tt\"\u003eN\u003c/span\u003e otherwise.\u003c/p\u003e"}},{"title":"Examples","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\u003e2\n1 3\n2 3\n\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003eY\n\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n"}},{"title":"","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\u003e1\n1 2\n\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003eN\n\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n"}}]}