{"trustable":false,"sections":[{"title":"","value":{"format":"HTML","content":"啦啦啦\n\u003cbr\u003e\u003ccenter\u003e\u003cimg src\u003d\"CDN_BASE_URL/af02b441b851e87956ed79b931506130?v\u003d1678604446\"\u003e\u003c/center\u003e"}},{"title":"Input","value":{"format":"HTML","content":"The first line of the input file contains a single integer t (1 \u0026lt;\u003d t \u0026lt;\u003d 10), the number of test cases, followed by the input data for each test case. The first line of each test case consists of two integers k (1 \u0026lt;\u003d k \u0026lt;\u003d 26), the number of different letters, and p (1 \u0026lt;\u003d p \u0026lt;\u003d 10), the number of instances of each letter. Followed by the first line, there are k lines, one for each letter, each containing p pairs of integers (xi, yi) for 1 \u0026lt;\u003d i \u0026lt;\u003d p. A pair indicates coordinates of the cell on the paper where one instance of the letter is written. The coordinates of the upper left cell of the paper is assumed to be (1,1). Coordinates are positive integers less than or equal to 1,000,000. You may assume that no cell contains more than one letter.\n\u003cbr\u003e"}},{"title":"Output","value":{"format":"HTML","content":"There should be one line per test case containing a single word YES or NO depending on whether the input paper can be divided successfully according to the constraints stated in the problem.\n\u003cbr\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\n3 2\n6 4 8 4\n4 2 2 1\n2 3 2 4\n3 3\n1 1 3 1 5 1\n2 1 4 1 6 1\n2 2 4 2 8 1\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003eYES\nNO\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n"}}]}