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 barssaka on 10/19/16.
 */
import java.util.*;
import java.math.*;
public class Mysample {
    public static class Point {
        double x;
        double y;
        Point (double x, double y) {
            this.x = x;
            this.y = y;
        }
    }
    public static class Line {
        double a;
        double b;
        Line(double a, double b) {
            this.a = a;
            this.b = b;
        }
    }
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        double x0 = scanner.nextDouble();
        double y0 = scanner.nextDouble();
        double x1 = scanner.nextDouble();
        double y1 = scanner.nextDouble();
        double x2 = scanner.nextDouble();
        double y2 = scanner.nextDouble();
        double area = oneLoop(x0, y0, x1, y1, x2, y2);
        System.out.format("%.8f", area);
    }

    public static boolean hasSameX(Point p0, Point p1, Point p2) {
        if (p0.x == p1.x || p1.x == p2.x || p2.x == p0.x) {
            return true;
        }
        return false;
    }

    public static boolean hasSameY(Point p0, Point p1, Point p2) {
        if (p0.y == p1.y || p1.y == p2.y || p2.y == p0.y) {
            return true;
        }
        return false;
    }
    public static void rotate(Point p, double randomAngle) {
        double x = p.x * Math.cos(randomAngle) - p.y * Math.sin(randomAngle);
        double y = p.y * Math.cos(randomAngle) + p.x * Math.sin(randomAngle);
        p.x = x;
        p.y = y;
    }

    public static Line getLine(Point p1, Point p2) {
        double k = (p1.y - p2.y) / (p1.x - p2.x);
        double b = p1.y - p1.x * k;
        return new Line(k, b);
    }

    public static Point getMidPoint(Point p0, Point p1) {
        return new Point((p0.x + p1.x) / 2, (p0.y + p1.y) / 2);
    }

    public static Line getReverseLine(Line l1, Point p) {
        double k = -1 / l1.a;
        double b = p.y - k * p.x;
        return new Line(k, b);
    }

    public static Point getCenter(Line l1, Line l2) {
        // l1 = k1 * x + b1;
        // l2 = k2 * x + b2;
        // (b1 - b2) = (k2 - k1) * x;
        double x = (l1.b - l2.b) / (l2.a - l1.a);
        double y = l1.a * x + l1.b;
        return new Point(x, y);
    }

    public static double findArea(double angle0, double angle1, double angle2, Point p0, Point p1, Point p2, Point center) {
        int N = 3;
        //int flag = -1;
        while (N <= 100) {
            //int count = 0;
            if (Math.abs(Math.sin((angle0 - angle1) * N / 2)) < 1e-3) {
                //double area = getArea(p0, p1, N, center);
                //count++;
            }
            else {
                N++;
                continue;
            }
            if (Math.abs(Math.sin((angle1 - angle2) * N / 2)) < 1e-3) {
                //double area = getArea(p1, p2, N, center);
                //count++;
            }
            else {
                N++;
                continue;
            }
            if (Math.abs(Math.sin((angle2 - angle0) * N / 2)) < 1e-3) {
                //double area = getArea(p2, p0, N, center);
                //count++;
            }
            else {
                N++;
                continue;
            }
                double distance = Math.sqrt((center.x - p0.x) * (center.x - p0.x) + (center.y - p0.y) * (center.y - p0.y));
                double angle = 2 * Math.PI / N;
                double area = distance * distance * Math.sin(angle) / 2 * N;
                return area;
        }
        //System.out.println(N);
        return 0.0;
    }
    public static double update(double area, double tempArea) {
        if (area < 1e-6) {
            return tempArea;
        }
        return Math.min(area, tempArea);
    }
    public static double getArea(Point p0, Point p1, int N, Point center) {
        Line l = getLine(p0, p1);
        // y = a * x + b
        // a * x - y + b = 0;
        double distance = Math.sqrt((p0.x - p1.x) * (p0.x - p1.x) + (p0.y - p1.y) * (p0.y - p1.y));
        double h = Math.abs(l.a * center.x - center.y + l.b) / Math.sqrt(l.a * l.a + 1);
        //System.out.println(distance + " " + h);
        return distance * h / 2 * N;
    }

    public static boolean isOnSameLine(Point p0, Point p1, Point p2) {
        Line l = getLine(p1, p2);
        if (p0.x * l.a + l.b - p0.y < 1e-6) {
            return true;
        }
        else {
            return false;
        }
    }
    public static boolean hasZeroXOrY(Point p0, Point p1, Point p2) {
        if (Math.abs(p0.x) < 1e-6 || Math.abs(p0.y) < 1e-6 || Math.abs(p1.x) < 1e-6 || Math.abs(p1.y) < 1e-6 || Math.abs(p2.x) < 1e-6 || Math.abs(p2.y) < 1e-6) {
            return true;
        }
        return false;
    }
    public static double oneLoop(double x0, double y0, double x1, double y1, double x2, double y2) {

        Point p0 = new Point(x0, y0);
        Point p1 = new Point(x1, y1);
        Point p2 = new Point(x2, y2);

        Random random = new Random();

        while (hasSameX(p0, p1, p2) || hasSameY(p0, p1, p2)) {
            double randomAngle = random.nextInt();
            randomAngle = Math.toRadians(randomAngle);
            rotate(p0, randomAngle);
            rotate(p1, randomAngle);
            rotate(p2, randomAngle);
        }
        Line l1 = getLine(p0, p1);
        Line l2 = getLine(p1, p2);

        Line rl1 = getReverseLine(l1, getMidPoint(p0, p1));
        Line rl2 = getReverseLine(l2, getMidPoint(p1, p2));

        Point center = getCenter(rl1, rl2);

        //System.out.println(center.x + " " + center.y);
        double angle0 = Math.atan2(p0.y - center.y, p0.x - center.x);
        double angle1 = Math.atan2(p1.y - center.y, p1.x - center.x);
        double angle2 = Math.atan2(p2.y - center.y, p2.x - center.x);

        double area = findArea(angle0, angle1, angle2, p0, p1, p2, center);
        return area;
    }
}