A company owns an office building with a perfectly square, flat roof that has several hatches. After a series of burglaries in which the intruders entered through these hatches, the company decided to guard the hatches with a watchdog.
To keep the dog from falling off the roof, one end of a leash is attached to the dog's collar and the other end is fastened to a point on the roof. If the leash is too short the dog cannot reach every hatch; if it is too long the dog can fall off the building. The leash has a hook at each end, so none of its length is used for knots (its full length is exactly how far the dog can reach).
The company wants both of the following to hold:
A leash may only be fastened at a point with integer coordinates. If the building is 10×10 meters, the south-west corner is (0,0) and the north-east corner is (10,10). A leash cannot be fastened at a point that holds a hatch.
If there is no point where the leash can be fastened so that the dog reaches every hatch without the leash extending beyond the roof, this breed of dog cannot be used.
The first line contains the number of test cases N.
Each test case begins with a line containing two integers S and H. S is the side length of the square roof in meters; it is even and 2≤S≤40. H is the number of hatches, 1≤H≤50.
The next H lines each contain two integers X and Y, the coordinates of a hatch. A hatch never lies outside the roof or on the roof's perimeter, and no two hatches share the same position.
For each test case, print on one line the coordinates X Y of a point at which the leash can be fastened so that the dog reaches every hatch without the leash extending beyond the edge of the roof.
If several points are possible, print the one with the smallest X; if several remain, print the one with the smallest Y among those.
If no such point exists, print poodle for that test case.