Fire Tower

No attempts yetTime limit1sMemory limit128 MB

Problem

A mountainous region suffered many forest fires during last year's dry season. Before this year's dry season begins, you want to build a single fire tower from which every slope of the mountain range can be watched. To keep the construction cost as low as possible, you want the height of the tower to be as small as possible.

A polyhedral terrain can be thought of as the surface of a mountain range made of flat faces, with no curves and no overhangs. In this problem we consider only the two-dimensional case, which simplifies the terrain into a single polygonal chain in the plane. The chain is given by nn vertices v1,v2,,vnv_1, v_2, \dots, v_n in increasing order of xx-coordinate, together with n1n-1 edges, where edge ii connects the two adjacent vertices viv_i and vi+1v_{i+1} for 1in11 \le i \le n-1.

The figure below shows the minimum-height fire tower for one polygonal chain.

The tower is built vertically on the terrain, and its base may lie on any vertex or any edge of the chain. Compute the smallest possible height of the tower such that every point of the chain is visible from the top of the tower. A point qq of the terrain is visible from the top pp of the tower when the straight segment pqpq never goes below the terrain. You may assume that the minimum height is never 00.

Input

The input is read from standard 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, where 4n10004 \le n \le 1000. Each of the next nn lines contains two integers xx and yy, the coordinates of one vertex, where 0x,y1000000 \le x, y \le 100000. The vertices are given with distinct, strictly increasing xx-coordinates.

Output

For each test case, print a single line containing the minimum height of the fire tower that can watch the whole polygonal chain, rounded to one digit after the decimal point. If this minimum height is greater than 10001000, print IMPOSSIBLE instead.