Roof

No attempts yetTime limit1sMemory limit128 MB

Problem

You are going to build a new house. To estimate the minimum construction cost of the roof, you first need to know its height. You only have the outline of the house, so you must compute the roof height from that outline.

Here is the precise setup. The outline of the house is a rectilinear polygon: every edge is axis-parallel, either horizontal or vertical. Let PP be such a polygon with nn vertices.

The straight skeleton SK(P)SK(P) is the trace left by the vertices of PP as PP shrinks: every edge moves inward at the same speed while keeping its direction. Figure 1 (a) and (b) show this shrinking process for PP and the resulting SK(P)SK(P).

Figure 1

Now place PP on the XYXY plane and shrink it at unit speed while simultaneously lifting it upward (the +Z+Z direction) at unit speed. As it moves, PP sweeps out a three-dimensional polyhedral surface called the terrain, and SK(P)SK(P) is exactly the projection of the terrain's edges onto the XYXY plane. By construction every face of this terrain lies in a plane that makes a dihedral angle of 4545^\circ with the XYXY plane, and every face is bounded by at least one edge of PP. We call this terrain the roof of PP; Figure 1 (c) shows it.

The height of a point qq on the roof is its altitude, that is, the distance between qq and its projection onto the XYXY plane. The height of the roof is the maximum height over all points on it. Your task is to compute the height of the roof of the given rectilinear polygon PP.

Input

The first line contains the number of test cases TT.

Each test case begins with a line containing an integer nn, the number of vertices of the polygon PP, with 4n10004 \le n \le 1000. The next line lists the (x,y)(x, y) coordinates of the nn vertices of PP in counterclockwise order: first the xx and yy of the first vertex, then the xx and yy of the second vertex, and so on. All values are separated by single spaces, and every coordinate is an integer between 11 and 100000100000 inclusive.

Output

For each test case print exactly one line: the height of the roof of PP, written with exactly one digit after the decimal point.