{"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":"MD","content":"\u003cdiv class\u003d\"panel_content\"\u003e\n Based on the CCPC\u0027s rule, the number of medals was 50\\% of the number of participating teams, rounded to the nearest integer. This is ambiguous when the fractional part of the result is exactly $0.5$. For,example,there were 115 participating teams, and the rank of Bob\u0027s team was 58. The organizer originally decided to round down the number, so there were only 58 medals, and Bob\u0027s team could not win a medal. Many people defended him against the organizer, saying that his team deserved a medal. Later, the organizer changed to round up the number, and Bob\u0027s team finally won a medal.\n \u003cbr\u003e\n \u003cbr\u003eNow, give you the scoreboard of a contest and the proportion of medal teams, could you check whether there exists a team, such that they would win a medal were the number of medals rounded up when the fractional part is exactly $0.5$, or not if rounded down?\n \u003cbr\u003e\n \u003cbr\u003eA team ranks before another if they solved more problems or both teams solved an equal number of problems but they had less penalty time.\n\u003c/div\u003e"}},{"title":"Input","value":{"format":"MD","content":"The first line of input consists of a single integer $T$ $(1 \\leq T \\leq 120)$, denoting the number of test cases.\n\u003cbr\u003eEach test case starts with a line of two integers $n$ $(1 \\leq n \\leq 10^5)$, denoting the number of participating teams, and $d$ $(0 \\leq d \\leq 9)$, denoting that the proportion of medal teams is $10*d\\%$. For the next $n$ lines, each containing a string $s$ and two integers $p, t$ $(0 \\leq p, t \\leq 10^9)$, denoting the name of the team, the number of problems solved and the penalty time of the team, respectively. The name of the each team contains at least 1 and at most 10 latin letters. The names are case sensitive. No two teams have the same name. No two teams have the same penalty time. The sum of $n$ over all test cases does not exceed $10^6$."}},{"title":"Output","value":{"format":"MD","content":"For each test case, print the team name if there exists such team, or print $\\texttt{Quailty is very great}$ otherwise. It can be proved that there is at most one such team.\n\u003cbr\u003e"}},{"title":"Sample","value":{"format":"MD","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\u003e\u003cpre\u003e2\n5 1\nAce 1000 0\nLuffy 999 1\nSabo 998 2\nRoronoa 997 3\nSanji 996 4\n2 3\nYou 0 0\nI 10 1\u003c/pre\u003e\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003e\u003cpre\u003eAce\nQuailty is very great\u003c/pre\u003e\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n"}}]}