{"trustable":true,"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 class\u003d\"panel_content\"\u003eAgrael喜欢在课堂上和他的朋友Animal玩一个简单的游戏。在这个游戏中,有n堆编号从1到n的石头,第1堆有M\u003csub\u003e1\u003c/sub\u003e颗石头,第2堆有M\u003csub\u003e2\u003c/sub\u003e颗石头,...第n堆有M\u003csub\u003en\u003c/sub\u003e颗石头。Agrael和Animal轮流移动,在每一步中,每个玩家可以从第1堆最多拿走L\u003csub\u003e1\u003c/sub\u003e颗石头,或者从第2堆最多拿走L\u003csub\u003e2\u003c/sub\u003e颗石头,...或者从第n堆拿走L\u003csub\u003en\u003c/sub\u003e颗石头。拿到最后一颗石头的玩家获胜。\u003cbr\u003e\u003cbr\u003e在Agrael和Animal玩了几个月之后,老师终于生气了,决定惩罚他们。但当老师了解游戏规则后,他对这个游戏如此感兴趣,以至于他要求Agrael和他玩这个游戏,如果Agrael赢了,他就不会受到惩罚。在Agrael和老师的每一步中,他们都会采取最佳的策略,Agrael能赢得这个游戏吗?\u003cbr\u003e\u003cbr\u003e老师总是先走(-_-),每一轮玩家必须至少拿走1颗石头,而且他们不能从多堆石头中拿走石头。\u003cbr\u003e\u003c/div\u003e"}},{"title":"输入","value":{"format":"HTML","content":"第一行包含测试用例的数量。每个测试用例以n(n ≤ 10)开头,表示有n堆石头。接下来有n行,第i行包含两个数字M\u003csub\u003ei\u003c/sub\u003e和L\u003csub\u003ei\u003c/sub\u003e(20 ≥ M\u003csub\u003ei\u003c/sub\u003e \u0026gt; 0, 20 ≥ L\u003csub\u003ei\u003c/sub\u003e \u0026gt; 0)。\u003cbr\u003e"}},{"title":"输出","value":{"format":"HTML","content":"你的程序每个测试用例输出一行,如果Agrael能赢得游戏,则打印“Yes”,否则打印“No”。\u003cbr\u003e"}},{"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\u003e2\r\n1\r\n5 4\r\n2\r\n1 1\r\n2 2\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"}}]}