Alice Loves Geometry.

Author: Efat Sikder

Problem Setter: Abu Bakor Siddik

Member, IUBAT IITS Programming Club

Alice loves geometry. She solved the most problems related to geometry. So, everything is very easy for her.

One day, she was thinking about a problem. If three non-collinear points (cartesian) are given in the plane, is it possible to calculate the circumference of all unique circles that intersect all three points or not? If it is not possible, print -1; otherwise, print the circumference.

Input Format

In the input file, you will find one or more test cases. Each test case is represented on a single line and comprises six real numbers: x1, y1, x2, y2, x3, y3. These numbers correspond to the coordinates of three points. It is important to note that the diameter of the circle determined by these three points will never exceed one million. The input is terminated when the end of the file is reached.

Output Format

For each test case, you should print one line containing one real number.
If it is not possible to determine the circumference of the circle, then print -1.
Otherwise, print a number that should represent the circumference of the circle as determined by the three points. The circumference should be printed accurately and rounded to two decimal places. You can use the value of π, which is approximately 3.141592653589793, to calculate the circumference.

Print a new line after finishing printing all the outputs.

Samples

Input
0.0 -0.5 0.5 0.0 0.0 0.5 0.0 0.0 0.0 1.0 1.0 1.0 5.0 5.0 5.0 7.0 4.0 6.0 0.0 0.0 -1.0 7.0 7.0 7.0
Output
3.14 4.44 6.28 31.42
Input
50.0 50.0 50.0 70.0 40.0 60.0 0.0 0.0 10.0 0.0 20.0 1.0 0.0 -500000.0 500000.0 0.0 0.0 500000.0
Output
62.83 632.24 3141592.65
Limits
Language Time Memory
GNU C 11 1s 512MB
GNU C++ 14 1s 512MB
GNU C++ 11 1s 512MB
PHP 7 1s 1024MB
Java (OpenJDK 8) 1s 4096MB
Statistics
Login To Submit