A small team of commandos has infiltrated deep into enemy territory. They have just finished their mission and must now return to their rendezvous point without being caught. To stay safe, they want to follow a route that keeps them as far as possible from every enemy base.
The area is modeled as a rectangular grid of integer coordinates $(x, y)$ with $0 \le x < X$ and $0 \le y < Y$. At each step a commando moves one unit up, down, left, or right, and the route may never leave the grid. Distances use the Manhattan metric:
$$\operatorname{dist}((x_1, y_1), (x_2, y_2)) = |x_2 - x_1| + |y_2 - y_1|.$$
The separation of a route is the smallest Manhattan distance between any cell it visits (including the start and the rendezvous point) and any enemy base. The commandos first want to maximize this separation. Among all routes that achieve the maximum separation, they then want one with the fewest steps. Enemy bases outside the grid do not exist and can be ignored.
The first line contains the number of test cases $T$ $(1 \le T \le 100)$. Each test case is given as follows:
All given coordinates lie on the grid and are pairwise distinct.
For each test case, print one line with two integers separated by a single space: the maximum achievable separation from any enemy base, followed by the number of steps in the shortest route that achieves that separation.