{"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\"\u003ebackground:\u003cbr\u003e Philip likes to play the QQ game of Snooker when he wants a relax, though he was just a little vegetable-bird. Maybe you hadn\u0027t played that game yet, no matter, I\u0027ll introduce the rule for you first.\u003cbr\u003e There are 21 object balls on board, including 15 red balls and 6 color balls: yellow, green, brown, blue, pink, black.\u003cbr\u003e The player should use a white main ball to make the object balls roll into the hole, the sum of the ball\u0027s fixed value he made in the hole is the player\u0027s score. The player should firstly made a red ball into the hole, after that he gains red-ball\u0027s value(1 points), then he gets the chance to make a color ball, then alternately. The color ball should be took out until all the red-ball are in the hole. In other word, if there are only color balls left on board, the player should hit the object balls in this order: yellow(2 point), green(3 point), brown(4 point), blue(5 point), pink(6 point), black(7 point), after the ball being hit into the hole, they are not get out of the hole, after no ball left on board, the game ends, the player who has\u003cbr\u003ethe higher score wins the game. PS: red object balls never get out of the hole.\u003cbr\u003e I just illustrate the rules that maybe used, if you want to contact more details, visit http://sports.tom.com/snooker/ after\u003cbr\u003ethe contest.\u003cbr\u003e\u003cbr\u003e for example, if there are 12 red balls on board(if there are still red ball left on board, it can be sure that all the color\u003cbr\u003eballs must be on board either). So suppose Philp can continuesly hit the ball into the hole, he can get the maximun score is\u003cbr\u003e12 * 1 (12 red-ball in one shoot) + 7 * 12(after hit a red ball, a black ball which was the most valuable ball should be the target) + 2 + 3 + 4 + 5 + 6 + 7(when no red ball left, make all the color ball in hole).\u003cbr\u003e Now, your task is to judge whether Philip should make the decision to give up when telling you the condition on board(How many object balls still left not in the hole and the other player\u0027s score). If Philp still gets the chance to win, just print \"Yes\", otherwise print \"No\". (PS: if the max score he could get on board add his current score is equal to the opponent\u0027s current score, still output \"Yes\")\u003cbr\u003e \u003c/div\u003e"}},{"title":"Input","value":{"format":"HTML","content":"The first line contains a numble N indicating the total conditions. Then followed by N lines, each line is made of three integers:\u003cbr\u003eBall_Left P_Score O_Score represeting the ball number left on board, Philp\u0027s current score, and the opponent\u0027s current score.\u003cbr\u003eAll the input value are in 32 bit integer value range."}},{"title":"Output","value":{"format":"HTML","content":"You should caculate the max score left Philp can gain, and judge whether he has the possiblity to win."}},{"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\u003e2\r\n12 1 1\r\n1 30 39\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"}}]}