Ellipse

No attempts yetTime limit2sMemory limit64 MB

Problem

As a punishment for his conduct during geometry lessons — Alex did nothing while the rest of his class computed the areas of various figures — his geometry teacher gave him a tedious homework assignment.

Alex now has to compute the areas of several ellipses drawn on a sheet of paper torn from a textbook. The sheet has a rectangular grid on it, so the coordinates of points can be read off. Even then, finding the area of an ellipse can be quite involved, especially when the axes of the ellipse are neither vertical nor horizontal.

Being very lazy, Alex wants you to write a program that determines the area of an ellipse from the coordinates of five distinct points lying on it. He will then type in these five points for each ellipse and compute every area this way.

Input

The first line contains the number of ellipses kk (1k10001 \le k \le 1\,000). Each of the next kk lines contains the coordinates of five points lying on the corresponding ellipse, given as x1 y1 x2 y2  x5 y5x_1\ y_1\ x_2\ y_2\ \dots\ x_5\ y_5. All coordinates are integers whose absolute values do not exceed 10001\,000.

Output

For each ellipse, print one line, for a total of kk lines. Print IMPOSSIBLE if the area cannot be determined (there is no ellipse passing through all five given points, or there is more than one such ellipse); otherwise print the area of the ellipse precise to six digits after the decimal point. Whenever such an ellipse exists, it always fits completely inside the textbook page, i.e. every point (x,y)(x, y) of the ellipse satisfies x1000|x| \le 1\,000 and y1000|y| \le 1\,000.