{"trustable":false,"prependHtml":"\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 async src\u003d\"https://mathjax.codeforces.org/MathJax.js?config\u003dTeX-AMS-MML_HTMLorMML\" type\u003d\"text/javascript\"\u003e\u003c/script\u003e","sections":[{"title":"","value":{"format":"HTML","content":"\u003cdiv\u003e\n 一种新的游戏叫做csdngame。\n \u003cbr\u003e 游戏规则是这样的:\n \u003cbr\u003e 如图所示,游戏在一个n行m列(1 ≤ n ≤ 1000且2 ≤ m ≤ 100)的棋盘上进行,每行有一个黑子(黑方)和一个白子(白方)。执黑的一方先行,每次玩家可以移动己方的任何一枚棋子到同一行的任何一个空格上,当然这过程中不许越过该行的敌方棋子。双方轮流移动,直到某一方无法行动为止,移动最后一步的玩家获胜。黑方先下。图1是某个初始局面,图二是黑方移动一个棋子后的局面(第一行的黑子左移两步)。\n \u003cbr\u003e \n \u003cbr\u003e \n \u003cimg src\u003d\"http://acm.hdu.edu.cn/data/images/C63-1003-1.png\"\u003e\n \u003cbr\u003e \n \u003cbr\u003e 图1\n \u003cbr\u003e \n \u003cbr\u003e \n \u003cimg src\u003d\"http://acm.hdu.edu.cn/data/images/C63-1003-2.png\"\u003e\n \u003cbr\u003e \n \u003cbr\u003e 图2\n\u003c/div\u003e"}},{"title":"Input","value":{"format":"HTML","content":"\u003cdiv\u003e\n 输入数据有多组。每组数据第一行为两个整数n和m,由空格分开。接下来有n行,每行两个数Ti,Ji (1 ≤ Ti, Ji ≤ m)分别表示Tom和Jerry在该行棋子所处的列数。\n \u003cbr\u003e \n \u003cb\u003e注意:各组测试数据之间有不定数量的空行。你必须处理到文件末。\u003c/b\u003e\n\u003c/div\u003e"}},{"title":"Output","value":{"format":"HTML","content":"\u003cdiv\u003e\n 对于每组测试数据输出一行你的结果。如果当前局面下黑方有必胜策略则输出“I WIN!”,否则输出“BAD LUCK!”。\n\u003c/div\u003e"}},{"title":"Sample Input","value":{"format":"HTML","content":"\u003cdiv\u003e \n \u003cpre\u003e\r\n\t~~~~~~~~~~~~~~~~~~~~~下面是输入样例~~~~~~~~~~~~~~~~~~~~~~~··\r\n3 6\r\n4 5\r\n1 2\r\n1 2\r\n\r\n3 6\r\n4 5\r\n1 3\r\n1 2 \u003c/pre\u003e \n\u003c/div\u003e"}},{"title":"Sample Output","value":{"format":"HTML","content":"\u003cdiv\u003e \n \u003cpre\u003e\r\n\t~~~~~~~~~~~~~~~~~~下面是输出样例~~~~~~~~~~~~~~~~~~~~~~~~··\r\nBAD LUCK!\r\nI WIN!\u003c/pre\u003e \n \u003cdiv\u003e \n \u003cpre\u003e\r\n\t\t\u003c/pre\u003e \n \u003c/div\u003e \n\u003c/div\u003e"}}]}