{"trustable":true,"sections":[{"title":"","value":{"format":"HTML","content":"\u003cdiv\u003e\u003cp\u003eGiven a list of phone numbers, determine if it is consistent in the sense that no number is the prefix of another. Let\u0027s say the phone catalogue listed these numbers:\u003c/p\u003e\u003cul\u003e\u003cli\u003eEmergency 911\u003c/li\u003e\u003cli\u003eAlice 97 625 999\u003c/li\u003e\u003cli\u003eBob 91 12 54 26\u003c/li\u003e\u003c/ul\u003e\u003cp\u003eIn this case, it\u0027s not possible to call Bob, because the central would direct your call to the emergency line as soon as you had dialled the first three digits of Bob\u0027s phone number. So this list would not be consistent.\u003c/p\u003e\u003c/div\u003e"}},{"title":"Input","value":{"format":"HTML","content":"\u003cp\u003eThe first line of input gives a single integer, 1 ≤ \u003ci\u003et\u003c/i\u003e ≤ 40, the number of test cases. Each test case starts with \u003ci\u003en\u003c/i\u003e, the number of phone numbers, on a separate line, 1 ≤ \u003ci\u003en\u003c/i\u003e ≤ 10000. Then follows \u003ci\u003en\u003c/i\u003e lines with one unique phone number on each line. A phone number is a sequence of at most ten digits. \u003c/p\u003e"}},{"title":"Output","value":{"format":"HTML","content":"\u003cp\u003eFor each test case, output \"YES\" if the list is consistent, or \"NO\" otherwise.\u003c/p\u003e"}},{"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\n3\r\n911\r\n97625999\r\n91125426\r\n5\r\n113\r\n12340\r\n123440\r\n12345\r\n98346\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003eNO\r\nYES\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n"}}]}