{"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\"\u003e21 point,also named Black Jack, originated in France,has spread around the world.\u003cbr\u003e\u003cbr\u003e21 point, a gambling game played by using poker,is also the only one which is able to win banker by using probability calculation.\u003cbr\u003e\u003cbr\u003e--- Encyclopedia from good search\u003cbr\u003e\u003cbr\u003eWe define blackjack rules are as follows, which is different from the original rules slightly.\u003cbr\u003e\u003cbr\u003ecards are as follows:\u003cbr\u003e\u003cbr\u003eA 2 3 4 5 6 7 8 9 10 J Q K\u003cbr\u003e\u003cbr\u003eA is as 1 point.\u003cbr\u003e\u003cbr\u003eJQK are all as 10 points.\u003cbr\u003e\u003cbr\u003eWe assume that the casino prepared a lot of cards,that is, you can assume that the probability of getting each card is the same.\u003cbr\u003e\u003cbr\u003eThere are two players who were banker and Player.\u003cbr\u003e\u003cbr\u003eThey get two cards at first and can see the card each other.\u003cbr\u003e\u003cbr\u003ePlayer operates first.\u003cbr\u003e\u003cbr\u003eEvery turn, he can bid or stop bidding.\u003cbr\u003e\u003cbr\u003eIf he bid, he can take a card from the deck.\u003cbr\u003e\u003cbr\u003eOnce the the points are over 21,he will lose at once,which is called \"busting\", otherwise he will bid until stopping bidding and turn to banker.\u003cbr\u003e\u003cbr\u003ethe rule of banker is the same as the player\u0027s.\u003cbr\u003e\u003cbr\u003eIf there is no \"busting\", the one who have higher points win.\u003cbr\u003e\u003cbr\u003eIf they have the same points,they get the tie.\u003cbr\u003e\u003cbr\u003eHere is the task,we give you the cards that both people have gotten.\u003cbr\u003e\u003cbr\u003eplease judge whether the Player have more than 50% winning percentage,\u003cbr\u003eif yes, output \"YES\", otherwise output,\"NO\".\u003cbr\u003e\u003cbr\u003eOh, yes, everyone is very smart.\u003cbr\u003e\u003c/div\u003e"}},{"title":"Input","value":{"format":"HTML","content":"The first line of the input file contains an integer Test(Test\u0026lt;\u003d100000), which indicates the number of test cases.\u003cbr\u003e\u003cbr\u003eFor each test case, there is a string with four characters. the first and the second char indicate the card of the player.and the others indicate the banker\u0027s.(we use âTâ instead of \u002710\u0027)"}},{"title":"Output","value":{"format":"HTML","content":"For each case of data output \"YES\" or \"NO\", it indicates whether the Player have more than 50% winning percentage."}},{"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\u003e1\r\nTTT9\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003eYES\r\n//it\u0027s clear that player will not bid, then the blanker has only 2/13 winning percentage.\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n"}}]}