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 PYTHON3):

Solution:
#!/usr/bin/env python
# -*- coding: utf-8 -*-

from itertools import combinations
from math import acos, fmod, hypot, pi, sin
# import pytest


def main():
    coordinates = [list(map(float, input().split())) for i in range(3)]
    points = [Point(i, j) for [i, j] in coordinates]
    polygon = CyclicPolygon(points)
    print(str(round(polygon.area_of_smallest_regular_polygon(), 6)))


def gcd(v1, v2):
    """ greatest common divisor """
    return v1 if v2 < 1e-3 else gcd(v2, fmod(v1, v2))


class Point:
    def __init__(self, x, y):
        self.x = x
        self.y = y

    def __eq__(self, other):
        if self.x == other.x and self.y == other.y:
            return True
        else:
            return False

    def __str__(self):
        return str(self.x) + "," + str(self.y) + "  "

    def distance_to(self, point):
        return hypot(self.x - point.x, self.y - point.y)

    def angle_to(self, point_a, point_b):
        a_length = self.distance_to(point_a)
        b_length = self.distance_to(point_b)
        c_length = point_a.distance_to(point_b)
        angle = acos((a_length**2 + b_length**2 - c_length**2) /
                     (2 * a_length * b_length))
        return angle

    def bisector_line(self, point):
        try:
            m = - (self.x - point.x) / (self.y - point.y)
        except ZeroDivisionError:
            m = float("inf")
        midpoint = Point(((self.x + point.x) / 2), ((self.y + point.y) / 2))
        c = midpoint.y - m*midpoint.x
        return Line(m, c)


class Line:
    def __init__(self, m, c):
        self.m = m
        self.c = c

    def concurrent_point(self, line):
        x = (self.c - line.c) / (self.m - line.m)
        y = self.m * (line.c - self.c)/(self.m - line.m) + self.c
        return Point(x, y)

    def has_concurrent_point(self, line):
        return True if self.m != line.m else False


class CyclicPolygon:
    def __init__(self, points):
        if self.are_cyclic(points):
            self.points = points
        else:
            raise ValueError

    def all_angles(self):
        angles = []
        for c in combinations(self.points, 3):
            angles.append(c[0].angle_to(c[1], c[2]))
            angles.append(c[1].angle_to(c[0], c[2]))
            angles.append(c[2].angle_to(c[0], c[1]))
        return set(angles)

    def are_cyclic(self, points):
        center = None
        for c in combinations(points, 3):
            l1 = c[0].bisector_line(c[1])
            l2 = c[0].bisector_line(c[2])
            concurrent_point = l1.concurrent_point(l2)
            # floating point equality test?
            if center is None or center == concurrent_point:
                center = concurrent_point
            else:
                return False
        return True

    def circumradius(self):
        A = self.points[0].angle_to(self.points[1], self.points[2])
        a = self.points[1].distance_to(self.points[2])
        return 0.5*(a/sin(A))

    def area_of_smallest_regular_polygon(self):
        angles = self.all_angles()
        divisor = angles.pop()
        while len(angles) > 0:
            divisor = gcd(angles.pop(), divisor)
        sides = round(pi / divisor)
        return 0.5 * sides * self.circumradius()**2 * sin(2*pi / sides)

if __name__ == '__main__':
    main()


def test_gcd():
    assert(gcd(8, 4) == 4)
    assert(gcd(12, 9) == 3)
    assert(gcd(9, 12) == 3)


class TestPoint:
    def test_constructor_assignment(self):
        p = Point(1, 2)
        assert(p.x == 1 and p.y == 2)

    def test_distance_to(self):
        p1 = Point(3, 4)
        p2 = Point(0, 0)
        assert(p1.distance_to(p2) == 5)

    def test_angle_to(self):
        p1 = Point(0, 0)
        p2 = Point(1, 0)
        p3 = Point(0, 1)
        assert(abs(p1.angle_to(p2, p3) - pi/2) < 1e-3)

    def test_bisector_line(self):
        p1 = Point(0, 1)
        p2 = Point(1, 0)
        l = p1.bisector_line(p2)
        assert(l.m == 1)
        assert(l.c == 0)


class TestLine:
    def test_concurrent_point(self):
        l1 = Line(1, 0)
        l2 = Line(-1, 0)
        assert(l1.concurrent_point(l2).x == 0 and
               l1.concurrent_point(l2).y == 0)

    def test_has_concurrent_point(self):
        l1 = Line(1, 0)
        l2 = Line(1, 1)
        l3 = Line(2, 1)
        assert(not l1.has_concurrent_point(l2))
        assert(l1.has_concurrent_point(l3))


class TestCyclicPolygon:

    p1 = Point(0, 0)
    p2 = Point(1, 0)
    p3 = Point(0, 1)
    p4 = Point(1, 1)
    p5 = Point(5, 2)
    p6 = Point(7, 6)
    p7 = Point(8, 2)
    p8 = Point(10, 12)
    p9 = Point(15, 18)

    t1 = CyclicPolygon([p1, p2, p3])
    t2 = CyclicPolygon([p4, p5, p6])
    t3 = CyclicPolygon([p7, p8, p9])

    def test_valid_construction(self):
        p1 = Point(1, 0)
        p2 = Point(5, 19)
        p3 = Point(7, -22)
        CyclicPolygon([p1, p2, p3])

    def test_invalid_construction(self):
        p1 = Point(1, 0)
        p2 = Point(5, 19)
        p3 = Point(7, -22)
        p4 = Point(3, -22)
        p5 = Point(1, -10)
        with pytest.raises(ValueError):
            CyclicPolygon([p1, p2, p3, p4, p5])

    def test_all_angles(self):
        angles = sorted(self.t1.all_angles())
        assert(angles[0] - pi/4 < 1e-3)
        assert(angles[1] - pi/2 < 1e-3)
        angles = sorted(self.t2.all_angles())
        angles = sorted(self.t3.all_angles())

    def test_circumradius(self):
        assert(self.t1.circumradius() - hypot(0.5, 0.5) < 1e-3)

    def test_area_of_smallest_regular_polygon(self):
        assert(self.t1.area_of_smallest_regular_polygon() - 1 < 1e-3)