Welcome to ZOJ
Information
Select Problem
Runs
Ranklist
ZOJ Problem Set - 3907
Two Ellipses

Time Limit: 2 Seconds      Memory Limit: 65536 KB      Special Judge

AB and CD are two line segments without a common point. E1 and E2 are two ellipses without any common part. E1's focuses are A and B, and E2's focuses are C and D. Can you tell the maximum of S1×S2, where S1 and S2 are the areas of E1 and E2.

Input

There are multiple test cases. The first line of input contains an integer T(T≤ 100) indicating the number of test cases. For each test case:

There are 8 integers in one line, indicating the coordinates of A, B, C and D. Each integer in the output is nonnegative and no more than 100.

Output

For each test case, output the the maximum of S1×S2. Relative error no more than 10-6 will be accepted.

Sample Input

1
2 2 4 2 3 3 3 5

Sample Output

9.476170044465

Hint

The sample

how to get 9.476170044465

Author: ZHOU, Yuchen
Source: ZOJ Monthly, October 2015
Submit    Status