Watchdog

No attempts yetTime limit1sMemory limit128 MB

Problem

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:

  • The dog can reach the center of every hatch (the dog reaches exactly as far as the leash would reach if it lay flat on the roof).
  • The leash never extends beyond the edge of the roof (reaching exactly to the edge is allowed).

A leash may only be fastened at a point with integer coordinates. If the building is 10×1010 \times 10 meters, the south-west corner is (0,0)(0, 0) and the north-east corner is (10,10)(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.

Input

The first line contains the number of test cases NN.

Each test case begins with a line containing two integers SS and HH. SS is the side length of the square roof in meters; it is even and 2S402 \le S \le 40. HH is the number of hatches, 1H501 \le H \le 50.

The next HH lines each contain two integers XX and YY, 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.

Output

For each test case, print on one line the coordinates XX YY 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 XX; if several remain, print the one with the smallest YY among those.

If no such point exists, print poodle for that test case.