ELLIPSE - Ellipse

no tags 

Given 5 points on a ellipse, calculate the area of the ellipse. We accept solutions with absolute error less than 10-6 or relative error less than 10-9.

Input

Many test cases. Each contains a line with 10 integers with absolute value less than 1000 - the X and Y coordinates of the 5 points, respectively.

Input terminates by EOF. Note that there can be extra spaces in a single line.

Output

Each line contains a single float-point number - the area of the corresponding ellipse, or "IMPOSSIBLE" if the ellipse doesn't exist or can't be unique determined.

Example

Input:
6 1 3 2 -2 -3 -3 -2 1 6
7 -3 2 7 6 3 5 5 -2 -9

Output:
IMPOSSIBLE
157.079633

Note: You can click on "Wrong Answer" to get further information.

Note: Judge is slightly modified to avoid some precision problems.


hide comments
David: 2020-09-12 01:00:09

Java start up time will overwhelm the time limit. Should have more time for Java solutions.


Added by:Fudan University Problem Setters
Date:2009-03-27
Time limit:0.200s
Source limit:50000B
Memory limit:1536MB
Cluster: Cube (Intel G860)
Languages:All except: C99 ERL JS-RHINO NODEJS OBJC PERL6 SQLITE VB.NET
Resource:Classical Problem, description by Blue Mary