You want to cover a rectangular floor completely with rectangular tiles. Given several floors, write a program that, for each floor, checks whether the tiles placed on it satisfy all three of the following conditions:
All coordinates are integers, and every tile has positive area. The lower-left corner of the floor is the origin (0,0), and its upper-right corner is (length,width). Each tile is the rectangle whose lower-left corner is (xl,yl) and whose upper-right corner is (xh,yh).
The first line contains the number of floors.
Each floor is described over several lines. The first line contains two positive integers, the length and width of the floor in millimeters; each of the length and width is at most 40000. The next line contains the number of tiles t (1≤t≤100). Each of the following t lines describes one tile as four integers
xl yl xh yh
where (xl,yl) is the lower-left corner and (xh,yh) is the upper-right corner of the tile. The coordinate axes of the floor and the tiles coincide.
For each floor, print exactly one of the following words on its own line:
NONDISJOINT: if some tiles overlap;NONCONTAINED: if no tiles overlap, but some tile extends outside the floor;NONCOVERING: if no tiles overlap and no tile extends outside the floor, but some part of the floor is left uncovered;OK: if none of the above holds.