{"trustable":true,"sections":[{"title":"","value":{"format":"HTML","content":"Freddie the frosh has chosen to take k courses. To meet the degree requirements, he must take courses from each of several categories. Can you assure Freddie that he will graduate, based on his course selection? "}},{"title":"Input","value":{"format":"HTML","content":"Input consists of several test cases. For each case, the first line of input contains 1 \u0026lt;\u003d k \u0026lt;\u003d 100, the number of courses Freddie has chosen, and 0 \u0026lt;\u003d m \u0026lt;\u003d 100, the number of categories. One or more lines follow containing k 4-digit integers follow; each is the number of a course selected by Freddie. Each category is represented by a line containing 1 \u0026lt;\u003d c \u0026lt;\u003d 100, the number of courses in the category, 0 \u0026lt;\u003d r \u0026lt;\u003d c, the minimum number of courses from the category that must be taken, and the c course numbers in the category. Each course number is a 4-digit integer. The same course may fulfil several category requirements. Freddie\u0027s selections, and the course numbers in any particular category, are distinct. A line containing 0 follows the last test case. "}},{"title":"Output","value":{"format":"HTML","content":"For each test case, output a line containing \"yes\" if Freddie\u0027s course selection meets the degree requirements; otherwise output \"no\". "}},{"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 2\r\n0123 9876 2222\r\n2 1 8888 2222\r\n3 2 9876 2222 7654 \r\n3 2\r\n0123 9876 2222\r\n2 2 8888 2222\r\n3 2 7654 9876 2222\r\n0\r\n\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003eyes\r\nno\r\n\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n"}}]}