{"trustable":false,"sections":[{"title":"","value":{"format":"HTML","content":"\u003cp\u003e You are Given a list of Numbers. You Have to tell if the list is Beautiful or not\u003c/p\u003e\n\u003cp\u003e A-List is called beautiful if no number is the prefix of another number in that List. Let\u0027s consider a list:\n$$$[123, 1234565, 123456]$$$ \u003c/p\u003e\nThe list is not beautiful, because the first number is the prefix of the second one.\n"}},{"title":"Input","value":{"format":"HTML","content":"Input starts with an integer $$$T (\u0026le; 50)$$$, denoting the number of test cases.\n\nEach case starts with an integer $$$n (1 \u0026le; n \u0026le; 10000)$$$ denoting the total numbers in their list. Each of the next $$$n$$$ lines contains one unique number. A number is a sequence of digits and has lengths from $$$1$$$ to $$$10$$$."}},{"title":"Output","value":{"format":"HTML","content":"For each case, print the case number and `YES` if the list is Beautiful or `NO` if it\u0027s 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\u003e2\n3\n911\n97625999\n91125426\n4\n123\n45678\n83457392\n5989380938\n\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003eCase 1: NO\nCase 2: YES\n\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n"}}]}