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:
import math
coords = []
for i in range(3):
    ls = input().split(' ')
    coords.append((float(ls[0]), float(ls[1])))

def diff(p1, p2):
    return math.sqrt((p1[0] - p2[0]) ** 2 + (p1[1] - p2[1]) ** 2)
def angle(p1, p2, p3):
    v1 = (p2[0] - p1[0], p2[1] - p1[1])
    v2 = (p2[0] - p3[0], p2[1] - p3[1])
    # print((v1[0] * v2[0] + v1[1] * v2[1]) /
        # (diff(v1, (0, 0)) * diff(v2, (0, 0))))
    try:
        ang = math.acos((v1[0] * v2[0] + v1[1] * v2[1]) /
            (diff(v1, (0, 0)) * diff(v2, (0, 0))))
    except ValueError:
        ang = math.acos(round((v1[0] * v2[0] + v1[1] * v2[1]) /
            (diff(v1, (0, 0)) * diff(v2, (0, 0)))))
    return min(ang, 2 * math.pi - ang)
    

def f():
    diff1 = diff(coords[0], coords[1])
    diff2 = diff(coords[0], coords[2])
    diff3 = diff(coords[1], coords[2])

    p1, p2, p3 = coords
    if math.isclose(diff1, diff2) and math.isclose(diff2, diff3) and math.isclose(diff1, diff3):
        print(math.sqrt(3) / 4 * diff1 ** 2)
        return
    if math.isclose(diff1, diff2):
        ang = angle(p2, p1, p3)
        n = 360 / (180 - math.degrees(ang))
        print(0.25 * n * diff1 ** 2 * 1 / math.tan(math.pi / n))
        return
    if math.isclose(diff1, diff3):
        ang = angle(p1, p2, p3)
        n = 360 / (180 - math.degrees(ang))
        print(0.25 * n * diff1 ** 2 * 1 / math.tan(math.pi / n))
        return
    if math.isclose(diff2, diff3):
        ang = angle(p1, p3, p2)
        n = 360 / (180 - math.degrees(ang))
        print(0.25 * n * diff2 ** 2 * 1 / math.tan(math.pi / n))
        return
    A = 2 * (p1[0] - p2[0])
    B = 2 * (p1[1] - p2[1])
    E = p1[0] ** 2 - p2[0] ** 2 + p1[1] ** 2 - p2[1] ** 2
    C = 2 * (p1[0] - p3[0])
    D = 2 * (p1[1] - p3[1])
    F = p1[0] ** 2 - p3[0] ** 2 + p1[1] ** 2 - p3[1] ** 2
    y = (E * C - F * A) / (B * C - D * A)
    x = (F - D * y) / C
    R2 = -(2 * p1[0] * x + 2 * p1[1] * y - p1[0] ** 2 - p1[1] ** 2 - x ** 2 - y ** 2)
    # print(x, y, math.sqrt(R2))
    current_min = 9e99
    ang1 = angle(p1, (x, y), p3)
    ang2 = angle(p2, (x, y), p1)
    ang3 = angle(p3, (x, y), p2)
    # print(ang1, ang2, ang3)
    ags = [ang1, ang2, ang3]
    for i in range(3, 101):
        # print(i)
        # poss_angle = math.radians((i - 2) / i * 180)
        poss_angle = 2 * math.pi / i
        found = True
        for elem in ags:
            val = elem / poss_angle
            # print(val)
            if not math.isclose(val, round(val), rel_tol = 1e-5):
                found = False
        if found:
            print(0.5 * i * R2 * math.sin(2 * math.pi / i))
            return

    # for i in range(3, 101):
        # area = 0.5 * i * R2 * 
    
f()