
Please note that if we add another friend located at, say street 3 and avenue 5, making a total of 12 friends, then we would have two candidate meeting points, pairs (3,4) and (3,5). The rule clearly defines that street 3 and avenue 4 is the meeting point.
Given the size of a grid representing the Grid city and the locations of each person of the group of friends, your task is to determine the best meeting point following the rule of the group, as stated above.
The first line of the input contains the number T of test cases, followed by T input blocks.
The first line of each test case consists of three positive numbers, the number of streets S, the number of avenues A (where S ≤ 1000 and A ≤ 1000), and the number of friends F (where 0 < F ≤ 50000). The following F input lines indicate the locations of the friends. A location is defined by two numbers, a street and an avenue, in this order.
The output for each test case must list the best meeting point formatted as follows:
(Street: 3, Avenue: 4)
Each test case must be on a separate line.