Manhattan Taxi

Given your waiting intersection and up to 100 taxi positions on a 100x100 grid, print the coordinates of the taxi with the smallest Manhattan distance.

Easy2ImplementationBrute forceMathArrayInterviewNo attempts yetTime limit2sMemory limit512 MB

Problem

The streets of Manhattan in New York form a grid, so a taxi travels only along the north, south, east and west directions. The distance from one intersection to another measured this way is called the taxicab distance, or the Manhattan distance. Hermann Minkowski first studied this form of geometry in 19th century Germany.

Suppose Manhattan is a 100km x 100km grid of streets whose blocks measure 1km x 1km. If someone waits for a taxi at the intersection (0,0)(0, 0) and one taxi stands at the intersection (100,100)(100, 100), the Manhattan distance between them is 200km. If the person waits at (100,100)(100, 100) and the taxi stands at (0,0)(0, 0), the Manhattan distance is still 200km.

Many taxis drive around Manhattan. Print the position of the taxi closest to the intersection where you are waiting.

Input

The first line has the coordinates xx and yy of the intersection where you wait for a taxi, separated by a space. The second line has the number of taxis NN in service in Manhattan, with 1N1001 \le N \le 100. Each of the next NN lines has the coordinates xx and yy of the intersection where one taxi stands, separated by a space.

Every coordinate is an integer between 0 and 100. A taxi always stands at an intersection, and no intersection holds more than one taxi. Exactly one taxi is closest to the intersection where you wait.

Output

Print the coordinates xx and yy of the closest taxi on one line, separated by a space.