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:


import java.util.Locale;
import java.util.Scanner;

/**
 *
 * @author Johan Sannemo <epiZend@gmail.com>
 */
public class Main {

    private static double eps = 0.00005;

    public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    sc.useLocale(Locale.ENGLISH);
    double[] x = new double[3];
    double[] y = new double[3];
    double min = 0;
    for (int i = 0; i < 3; i++) {
        x[i] = sc.nextDouble();
        y[i] = sc.nextDouble();
        min = Math.min(min, Math.min(x[i], y[i]));
    }
    for (int i = 0; i < 3; i++) {
        x[i] -= min;
        y[i] -= min;
    }
    double Ay = y[0];
    double By = y[1];
    double Cy = y[2];
    double Ax = x[0];
    double Bx = x[1];
    double Cx = x[2];

    double Ay2 = Ay * Ay;
    double By2 = By * By;
    double Cy2 = Cy * Cy;
    double Ax2 = Ax * Ax;
    double Bx2 = Bx * Bx;
    double Cx2 = Cx * Cx;
    double D = 2 * (Ax * (By - Cy) + Bx * (Cy - Ay) + Cx * (Ay - By));
    double X = ((Ay2 + Ax2) * (By - Cy) + (By2 + Bx2) * (Cy - Ay) + (Cy2 + Cx2) * (Ay - By)) / D;
    double Y = ((Ay2 + Ax2) * (Cx - Bx) + (By2 + Bx2) * (Ax - Cx) + (Cy2 + Cx2) * (Bx - Ax)) / D;
    double AtoB = Math.sqrt(Math.pow(Ax - Bx, 2) + Math.pow(Ay - By, 2));
    double AtoC = Math.sqrt(Math.pow(Ax - Cx, 2) + Math.pow(Ay - Cy, 2));
    double CtoB = Math.sqrt(Math.pow(Cx - Bx, 2) + Math.pow(Cy - By, 2));
    debug(AtoB);
    debug(AtoC);
    debug(CtoB);
    double radius = Math.sqrt(Math.pow(X - Ax, 2) + Math.pow(Y - Ay, 2));
    debug("radius " + radius);
    double exp = (2 * radius * radius - AtoB * AtoB) / (2 * radius * radius);
    if (exp < -1)
        exp = 1;
    double angleA = Math.toDegrees(Math.acos(exp)) + eps;

    debug("a " + angleA);
    exp = (2 * radius * radius - CtoB * CtoB) / (2 * radius * radius);
    if (exp < -1)
        exp = 1;
    double angleB = Math.toDegrees(Math.acos(exp)) + eps;

    debug("b " + angleB);
    debug("Angle C exp " + ((2 * radius * radius - AtoC * AtoC) / (2 * radius * radius)));
    exp = (2 * radius * radius - AtoC * AtoC) / (2 * radius * radius);
    if (exp < -1)
        exp = 1;
    debug("exp " + exp);
    double angleC = Math.toDegrees(Math.acos(exp)) + eps;
    debug("c " + angleC);
    for (int i = 3; i <= 100; i++) {
        double angle = (360 + 0.0) / i;
        debug("angle " + angle + " sides " + i);
        if (angleA % angle < 2 * eps && angleB % angle < 2 * eps && angleC % angle < 2 * eps) {
        debug("Corners: " + i);
        System.out.println((radius * radius * i * Math.sin((2 * Math.PI) / i)) / 2);
        break;
        } else {
        debug("Angle a " + angleA % angle + " b " + angleB % angle + " c " + angleC % angle);
        }
    }
    }

    private static void debug(Object string) {
    if (false) {
        System.out.println(string);
    }
    }
}