Problem: Nowadays all circuses in Berland have a round arena with diameter 13 meters, but in the past things were different.

In Ancient Berland arenas in circuses were shaped as a regular (equiangular) polygon, the size and the number of angles could vary from one circus to another. In each corner of the arena there was a special pillar, and the rope strung between the pillars marked the arena edges.

Recently the scientists from Berland have discovered the remains of the ancient circus arena. They found only three pillars, the others were destroyed by the time.

You are given the coordinates of these three pillars. Find out what is the smallest area that the arena could have.

Input

The input file consists of three lines, each of them contains a pair of numbers –– coordinates of the pillar. Any coordinate doesn't exceed 1000 by absolute value, and is given with at most six digits after decimal point.

Output

Output the smallest possible area of the ancient arena. This number should be accurate to at least 6 digits after the decimal point. It's guaranteed that the number of angles in the optimal polygon is not larger than 100.

Examples

Input

0.000000 0.000000
1.000000 1.000000
0.000000 1.000000


Output

1.00000000

Solution (in JAVA):

Solution:
/**
 * Created by RAE on 1/23/2015.
 */
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.Arrays;
import java.util.List;
import java.util.ArrayList;
import java.util.Collections;

public class Main {
    //the smallest area of the polygon is when the number of vertices is minimized
    //so n will = pi/(the greatest common denominator of the three angles)
    public static final double PI = 3.14159265;
    static double[][] coordinateArray = new double[3][2];

    static void findAngles(double sideArray[], double angleArray[]){
         //law of cosines to find angles

        double preVal1 = 0;
        double preVal2 = 0;
        double preVal3 = 0;

        preVal1 = (sideArray[1]*sideArray[1] + sideArray[2]*sideArray[2] - sideArray[0]*sideArray[0])/(2*sideArray[1]*sideArray[2]);
        preVal2 = (sideArray[2]*sideArray[2] + sideArray[0]*sideArray[0] - sideArray[1]*sideArray[1])/(2*sideArray[2]*sideArray[0]);
        preVal3 = (sideArray[1]*sideArray[1] + sideArray[0]*sideArray[0] - sideArray[2]*sideArray[2])/(2*sideArray[1]*sideArray[0]);

        angleArray[0] = Math.acos(preVal1);
        angleArray[1] = Math.acos(preVal2);
        angleArray[2] = Math.acos(preVal3);
    }

    static double findSideLength(double x1, double y1, double x2, double y2){ //given two coordinates, find length of side between them
        double xDist = 0;
        double yDist = 0;
        double distance = 0;

        xDist = x2 - x1;
        yDist = y2 - y1;
        distance = Math.sqrt(xDist*xDist + yDist*yDist);
        return distance;
    }

    static void findTriangle(double sideArray[]){
        sideArray[0] = findSideLength(coordinateArray[0][0], coordinateArray[0][1], coordinateArray[1][0], coordinateArray[1][1]);
        sideArray[1] = findSideLength(coordinateArray[1][0], coordinateArray[1][1], coordinateArray[2][0], coordinateArray[2][1]);
        sideArray[2] = findSideLength(coordinateArray[2][0], coordinateArray[2][1], coordinateArray[0][0], coordinateArray[0][1]);
    }

    static double findGreatestCommonDenominator(double x, double y){
        //euclidean algorithm for gcd
           while (Math.abs(x) > .0001 && Math.abs(y) > .0001){
               if(x > y)
                   x -= Math.floor(x/y)*y;
               else
                   y -= Math.floor(y/x)*x;
           }
        return x+y;
    }

    static double findCircleRadius(double sideArray[]){
        //must use heron's formula to find radius of circle created by triangle
        double s = 0;
        double circleArea = 0;
        double radius = 0;

        s = (sideArray[0] + sideArray[1] + sideArray[2])/2.0;
        circleArea = Math.sqrt(s*(s-sideArray[0])*(s-sideArray[1])*(s-sideArray[2]));
        radius = sideArray[0]*sideArray[1]*sideArray[2]/(4*circleArea);
        return radius;
    }

    public static void main(String[] args){
        BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
        String startString = null;
        String[] parsedString;
        double[] sideArray = new double[3];
        double[] angleArray = new double[3];
        double radius = 0;
        double verticeNum = 0;
        double smallestArea = 0;


        for(int i=0; i<3; i++) {
            try {
                startString = in.readLine();//.split(" ");
            } catch (Exception e) {
            }

            parsedString = startString.split(" ");
            for (int j=0; j<2; j++) {
                coordinateArray[i][j] = Double.parseDouble(parsedString[j]);
            }


        }

        findTriangle(sideArray);
        radius = findCircleRadius(sideArray);
        findAngles(sideArray, angleArray);
        double firstGCD = findGreatestCommonDenominator(angleArray[0], angleArray[1]);
        verticeNum = PI/ findGreatestCommonDenominator(firstGCD, angleArray[2]);
        smallestArea = verticeNum/2 * radius*radius*Math.sin(2*PI/verticeNum);
        String answer = String.format("%.8f%n", smallestArea);
        System.out.println(answer);

    }
}