{"trustable":true,"sections":[{"title":"","value":{"format":"MD","content":"In programming contests, a common problem for the contestants is to get a suited T-shirt. Sometimes people gets too long or too short T-shirts. So, this time I have planned to ask the authority to manage the T-shirts such that everyone gets a suitable one. From my past experience, it\u0027s known that there are 6 available sizes of T-shirts and they are XXL, XL, L, M, S, and XS. And exactly two sizes of the T-shirts suit a person.\n\nNow, for a contest there are T-shirts of **N** colors and **M** contestants. And for each color, all the 6 sizes are available. So, there are **6** \\* **N** T-shirts. And you are given the suitable sizes for each contestant. You have to distribute the T-shirts to the contestants such that everyone gets a suitable size. Only size matters, color is not an issue. Now you have to decide whether it\u0027s possible or not."}},{"title":"Input","value":{"format":"MD","content":"Input starts with an integer **T (\u0026le; 50)**, denoting the number of test cases.\n\nThe first line of each test case contains two integers **N** and **M**, separated by spaces, with **1 \u0026le; N, M \u0026le; 50**. Each of the next **M** lines will contain two sizes as described earlier."}},{"title":"Output","value":{"format":"MD","content":"For each case, print the case number and **\"YES\"** or **\"NO\"** depending on whether it\u0027s possible to distribute the T-shirts or not."}},{"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\u003e3\n3 6\nL XL\nXL L\nXXL XL\nS XS\nM S\nM L\n1 4\nS XL\nL S\nL XL\nL XL\n1 1\nL M\n\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003eCase 1: YES\nCase 2: NO\nCase 3: YES\n\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n"}}]}