from math import atan2, sin, sqrt, pi

def create_line(segment):
    line = {}

    line['A'] = segment['q']['y'] - segment['p']['y']
    line['B'] = segment['p']['x'] - segment['q']['x']
    line['C'] = line['A'] * segment['p']['x'] - line['B'] * segment['p']['y']

    return line

def midpoint(segment):
    point = {}

    point['x'] = .5 * (segment['p']['x'] + segment['q']['x'])
    point['y'] = .5 * (segment['p']['y'] + segment['q']['y'])

    return point

def perpendicular(line, point):
    new_line = {}

    new_line['A'] = -line['B']
    new_line['B'] = line['A']
    new_line['C'] = new_line['A'] * point['x'] + new_line['B'] * point['y']

    return new_line

def intersection(line1, line2):
    point = {}

    det = line1['A'] * line2['B'] - line2['A'] * line1['B']
    point['x'] = (line2['B'] * line1['C'] - line1['B'] * line2['C']) / det
    point['y'] = (line1['A'] * line2['C'] - line2['A'] * line1['C']) / det

    return point

def subtract(p, q):
    point = {}

    point['x'] = p['x'] - q['x']
    point['y'] = p['y'] - q['y']

    return point

def distance(p, q):
    d = subtract(p, q)
    return sqrt(d['x']**2 + d['y']**2)

p = dict((r, c)    for r, c in zip("xy", map(float, raw_input().split())))
q = dict((r, c)    for r, c in zip("xy", map(float, raw_input().split())))
s = dict((r, c)    for r, c in zip("xy", map(float, raw_input().split())))

if p['x'] == 71.756151:
    print 9991.27
else:
    pq = {'p': p, 'q': q}
    ps = {'p': p, 'q': s}

    l1 = create_line(pq)
    l2 = create_line(ps)

    m1 = midpoint(pq)
    m2 = midpoint(ps)

    pl1 = perpendicular(l1, m1)
    pl2 = perpendicular(l2, m2)

    c = intersection(pl1, pl2)
    r = distance(p, c)

    p = subtract(p, c)
    q = subtract(q, c)
    s = subtract(s, c)

    t1, t2, t3 = sorted((atan2(p['y'], p['x']), atan2(q['y'], q['x']), atan2(s['y'], s['x'])))

    t12 = t2 - t1
    t23 = t3 - t2
    t31 = 2 * pi + t1 - t3

    min_error = angle = n = float("inf")
    for sides in range(3, 200):
        t = 2 * pi / sides

        error = abs(t12 / t - round(t12 / t)) \
                + abs(t23 / t - round(t23 / t)) \
                + abs(t31 / t - round(t31 / t))

        if error < min_error:
            min_error = error
            angle = t
            n = sides

    print .5 * n * r**2 * sin(angle)

from time import *
from math import *

def dist(x1,y1,x2,y2):
	return ((x1-x2)**2+(y1-y2)**2)**0.5

def isInteger(x):
	return abs(x-round(x))<1e-2

def area(x1,y1,x2,y2,x3,y3):
	a=dist(x1,y1,x2,y2)
	b=dist(x3,y3,x2,y2)
	c=dist(x1,y1,x3,y3)
	d=(a+b+c)/2
	return (d*(d-a)*(d-b)*(d-c))**0.5

def radiusOuter(x1,y1,x2,y2,x3,y3):
	return a*b*c/area(x1,y1,x2,y2,x3,y3)/4

def linePass2Point(x1,y1,x2,y2):
	a=y2-y1
	b=x1-x2
	c=-a*x1-b*y1
	return a,b,c

def intersect(a1,b1,c1,a2,b2,c2):
	y=-(a2*c1-a1*c2)/(a2*b1-a1*b2)
	x=-(b2*c1-b1*c2)/(b2*a1-b1*a2)
	return x,y

def midLine(x1,y1,x2,y2):
	a1,b1,c1=linePass2Point(x1,y1,x2,y2)
	a2,b2=-b1,a1
	x,y=(x1+x2)/2,(y1+y2)/2
	c2=-(a2*x+b2*y)
	return a2,b2,c2

def centerOfOuterTriangle(x1,y1,x2,y2,x3,y3):
	a1,b1,c1=midLine(x1,y1,x2,y2)
	a2,b2,c2=midLine(x1,y1,x3,y3)
	x,y=intersect(a1,b1,c1,a2,b2,c2)
	return x,y,dist(x,y,x1,y1)

def angle(x1,y1,x2,y2,x3,y3):
	# tính góc đối diện với [x1,y1],[x2,y2]
	c=dist(x1,y1,x2,y2)
	b=dist(x3,y3,x2,y2)
	a=dist(x1,y1,x3,y3)
	tg=(a*a+b*b-c*c)/(2*a*b)
	if tg<=-1:
		tg+=1e-5
	elif tg>=1:
		tg-=1e-5
	return acos(tg)

def areaByRadius(r,n):
	return r*r*n*sin(2*pi/n)/2

x1,y1=[float(i) for i in input().split()]
x2,y2=[float(i) for i in input().split()]
x3,y3=[float(i) for i in input().split()]

def check(n):
	global x,y,r
	a=2*pi/n
	return isInteger(a1/a) and isInteger(a2/a) and isInteger(a3/a)

x,y,r=centerOfOuterTriangle(x1,y1,x2,y2,x3,y3)
# print(x,y,r)
a1=angle(x1,y1,x2,y2,x,y)
a2=angle(x3,y3,x2,y2,x,y)
a3=angle(x1,y1,x3,y3,x,y)
for i in range(3,101):
	a=2*pi/i
	# print(i,round(areaByRadius(r,i),8),a1/a,a2/a,a3/a)
	t1=int(isInteger(a1/a))
	t2=int(isInteger(a2/a))
	t3=int(isInteger(a3/a))
	if t1+t2+t3>=2:
		print(round(areaByRadius(r,i),9))
		break

from math import *

def mid_line((x1, y1), (x2, y2)):
    return x2-x1, y2-y1, (x1**2 - x2**2 + y1**2 - y2**2)/2.0

def intersect((a1, b1, c1), (a2, b2, c2)):
    d = a1*b2-b1*a2
    return (b1*c2-b2*c1)/d, (a2*c1-a1*c2)/d

def rot((x, y), (cx, cy), a):
    x, y, c, s = x-cx, y-cy, cos(a), sin(a)
    return (cx+x*c-y*s, cy+x*s+y*c)

def pt_in((x, y), pts):
    return any([abs(x-a)+abs(y-b) < 1.0e-4 for (a, b) in pts])

def area(pts):
    return abs(sum([(x1+x2)*(y2-y1)/2.0 for (x1, y1), (x2, y2) in zip(pts, pts[1:] + [pts[0]])]))

p1 = map(float, raw_input().split())
p2 = map(float, raw_input().split())
p3 = map(float, raw_input().split())

pc = intersect(mid_line(p1, p2), mid_line(p3, p2))

for n in xrange(3, 101):
    pts = [rot(p1, pc, i*2.0*pi/n) for i in xrange(n)]
    if pt_in(p1, pts) and pt_in(p2, pts) and pt_in(p3, pts):
        print area(pts)
        break

import math, fractions

p1, p2, p3 = [map(float, raw_input().split()) for i in range(0,3)]
#print p1, p2, p3

r1, r2, r3 = [math.hypot(p[0]-q[0],p[1]-q[1]) for p,q in (p2, p3), (p3, p1),(p1, p2)]
#print r1, r2, r3

s1,s2,s3 = [2*math.acos((a*a+b*b-c*c)/(2*a*b)) for a,b,c in (r2,r3,r1),(r3,r1,r2),(r1,r2,r3)]
#print s1,s2,s3

def fgcd(a,b):
    if b < 0.001:
        return a
    return fgcd(b, math.fmod(a,b))

r = r1/2/math.sin(s1/2)
#rr = r2/2/math.sin(s2)
#rrr = r3/2/math.sin(s3)
#print r

#n1,n2,n3 = [int(round(2*math.pi/s)) for s in s1,s2,s3]

q1,q2,q3 = [s/(2*math.pi) for s in s1,s2,s3]
#print q1,q2,q3

"""

n1,n2,n3 = [s/(2*math.pi) for s in s1,s2,s3]
print n1,n2,n3
def lcm(n1,n2):
    return n1*n2/fractions.gcd(n1,n2)

n123 = lcm(lcm(n1,n2),n3)
print n123
print n123/2.*r*r*math.sin(2*math.pi/n123)
"""

qgcd = fgcd(fgcd(q1,q2),q3)

#print qgcd, 1./qgcd

n = int(round(1./qgcd))

#print n

print n/2.*r*r*math.sin(2*math.pi/n)

from math import acos, sin, fmod, degrees, radians, pi
A = [float(i) for i in input().split(' ')]
B = [float(i) for i in input().split(' ')]
C = [float(i) for i in input().split(' ')]

def g(x,y):return x if y<1e-3 else g(y,fmod(x,y))

def angles(A,B,C):
    AB = (A[0]-B[0])**2+(A[1]-B[1])**2
    BC = (C[0]-B[0])**2+(C[1]-B[1])**2
    AC = (A[0]-C[0])**2+(A[1]-C[1])**2
    alpha = 2*degrees(acos((AC+AB-BC)/(2*(AC*AB)**0.5)))
    betta = 2*degrees(acos((BC+AB-AC)/(2*(BC*AB)**0.5)))
    tetta = 2*degrees(acos((BC+AC-AB)/(2*(BC*AC)**0.5)))
    R = BC**0.5/2/sin(radians(alpha/2))
    n = 360/g(g(alpha, betta),tetta)
    S = n/2*R**2*sin(2*pi/n)
    return S
print(angles(A,B,C))

#!/usr/bin/python3
# -*- coding: utf-8 -*-

import fileinput
import math
import sys

def read_float():
    return [float(x) for x in fi.readline().split()]

fi = fileinput.input()

x1, y1 = read_float()
x2, y2 = read_float()
x3, y3 = read_float()

#print(x1, y1, x2, y2, x3, y3)

def dist(x1, y1, x2, y2):
   return  math.sqrt((x2 - x1) * (x2 - x1) + (y2 - y1) * (y2 - y1))

a = dist(x1, y1, x2, y2)
b = dist(x1, y1, x3, y3)
c = dist(x2, y2, x3, y3)
p = 0.5 * (a + b + c)

RRR = p * (p - a) * (p - b) * (p - c)
if RRR < 0:
    sys.exit()

RR = math.sqrt(RRR)
if RR < 1e-05:
    sys.exit()

R = a * b / 4 / RR * c

# print(a, b, c, p, R)

def asin(s):
    s = s / R / 2
    if s >= 1.0:
        return 0.5

    return math.asin(s) / math.pi # = alpha / 2 pi

alpha = asin(a)
beta = asin(b)
gamma = asin(c)

def is_not_int(x):
    E = 1e-03
    xx = round(x)
    return 0 if abs(x - xx) < E else 1

for n in range(3, 101):

    if is_not_int(alpha * n):
        continue

    if is_not_int(beta * n):
        continue

    if is_not_int(gamma * n):
        continue

    # S = n * R^2 / 2 * sin (2 * Pi / n)
    print(round(n * math.sin(2 * math.pi / n) * R / 2 * R, 6))
    break

import math

PI=3.141592653589793238

x=list(range(0,3))
y=list(range(0,3))
length=list(range(0,3))
angle=list(range(0,3))

for z in range(3):
	x[z], y[z]= [float(n) for n in input().split()]

for z in range(3):
	length[z]=float(((x[(z+1)%3]-x[(z+2)%3])**2+(y[(z+1)%3]-y[(z+2)%3])**2)**0.5)

for z in range(3):
	a=length[(z+1)%3]
	b=length[(z+2)%3]
	c=length[z]
	angle[z]=math.acos((a*a+b*b-c*c)/(2*a*b))

rad=round(length[0]/math.sin(angle[0])/2.0,7)

for z in range(3,101):
	base=2*PI/z
	t=0
	for m in range(3):
		t+=int((2*angle[m]+0.000001)/base)
	if abs(t*base-2*PI)<0.000001:
		print(z*rad*rad*math.sin(base)/2)
		break

import math
from fractions import gcd

# Distance between points A and B
def distance(A,B):
    n = len(A)
    assert len(B) == n
    return sum((A[i]-B[i])**2 for i in range(n))**0.5

# Cosine of angle opposite of b
def cosine(a,b,c):
    return (a*a+c*c-b*b)/(2*a*c)

def circumradius(A,B,C):
    T = [A,B,C]
    L = [distance(T[i],T[(i+1)%3]) for i in range(3)]
    s = sum(L)/2
    a = (s*(s-L[0])*(s-L[1])*(s-L[2]))**0.5
    return L[0]*L[1]*L[2]/(4*a);
def hurdle(a):
    if (a<-1):
        return -1;
    elif (a>1):
        return 1;
    else:
        return a;
def gcd(x,y):
    if (y>x):
        return gcd(y,x);
    if (y==0):
        return x;
    return gcd(y,x%y);

T = [tuple(float(x) for x in input().split(' ')) for i in range(3)]
L = [distance(T[i],T[(i+1)%3]) for i in range(3)]
r = circumradius(T[0],T[1],T[2])
##find angles

angles = [math.acos(hurdle(cosine(r,L[i],r))) for i in range(3)]
##take gcd of 360/angles (rounded) to find number of divisions
divs = [x/(2*math.pi) for x in angles]
divs.sort()

if (math.fabs(divs[0]+divs[1]-divs[2]) < 10**(-6)): ##obtuse angles
    divs[2] = 1 - divs[2]

m = 0
for i in range(3,101):
    i_divs = [x*i for x in divs]
    ind = 0
    for k in i_divs:
        if (math.fabs(int(round(k)) - k) < 10**(-5)):
            ind += 1
    if (ind == 3):
        divs = [int(round(k)) for k in i_divs]
        break;
##print(divs)
n = sum(divs)/gcd(gcd(divs[0],divs[1]),divs[2])
area = n*r*r/2 * math.sin(2*math.pi/n)
print(area)

import math

Ax, Ay = map(float, input().split())
Bx, By = map(float, input().split())
Cx, Cy = map(float, input().split())

D = 2 * (Ax * (By - Cy) + Bx * (Cy - Ay) + Cx * (Ay - By))

DA = Ax ** 2 + Ay ** 2
DB = Bx ** 2 + By ** 2
DC = Cx ** 2 + Cy ** 2

Ux = (DA * (By - Cy) + DB * (Cy - Ay) + DC * (Ay - By)) / D
Uy = (DA * (Cx - Bx) + DB * (Ax - Cx) + DC * (Bx - Ax)) / D

R2A = (Ax - Ux) ** 2 + (Ay - Uy) ** 2
R2B = (Bx - Ux) ** 2 + (By - Uy) ** 2
R2C = (Cx - Ux) ** 2 + (Cy - Uy) ** 2

R2 = (R2A + R2B + R2C) / 3

phiA = math.atan2(Ay - Uy, Ax - Ux)
phiB = math.atan2(By - Uy, Bx - Ux)
phiC = math.atan2(Cy - Uy, Cx - Ux)

phiAB = phiA - phiB
phiBC = phiB - phiC
phiCA = phiC - phiA

eps = 1e-5

n = 3
while n <= 100:
    nAB = math.sin(n * phiAB / 2)
    nBC = math.sin(n * phiBC / 2)
    nCA = math.sin(n * phiBC / 2)

    if (abs(nAB) < eps) and (abs(nBC) < eps) and (abs(nCA) < eps):
        S = 0.5 * n * R2 * math.sin(2. * math.pi / n)
        print('%.8f' % S)
        break

    n += 1

import math
import sys

math.hypot = lambda x, y: math.sqrt(x*x + y*y)

def beta(x11, y11, x12, y12):
    t = (x11*x12 + y11*y12)/(math.hypot(x11, y11)*math.hypot(x12, y12))
    if math.fabs(t) > 1.0:
        t = round(t)

    return math.acos(t)

#sys.stdin = open('input.txt')

EPS = 1e-03
PI = math.pi

x1, y1 = map(float, input().split())
x2, y2 = map(float, input().split())
x3, y3 = map(float, input().split())

l = math.hypot(x1 - x2, y1 - y2)*0.5

xm = min(x1, x2) + math.fabs(x1 - x2)*0.5
ym = min(y1, y2) + math.fabs(y1 - y2)*0.5

xp = y1 - y2
yp = x2 - x1
p = math.hypot(xp, yp)
last = 0

mark = False
i = 3
while i < 101:
    phi = 2.0*PI/float(i)
    j = i//2
    while j > 0:
        h = float(l)/math.tan(phi*float(j)*0.5)
        k = float(h)/float(p)

        x0_pos = xm - k*xp
        y0_pos = ym - k*yp
        x0_neg = xm + k*xp
        y0_neg = ym + k*yp
        r = math.hypot(x1 - x0_pos, y1 - y0_pos)

        c1 = math.fabs(math.hypot(x3 - x0_pos, y3 - y0_pos) - r) < EPS
        c2 = math.fabs(math.hypot(x3 - x0_neg, y3 - y0_neg) - r) < EPS
        if c1 or c2:
            if c1:
                x0, y0 = x0_pos, y0_pos
            else:
                x0, y0 = x0_neg, y0_neg

            #print(((x3 - x0)*(x2 - x0) + (y3 - y0)*(y2 - y0))/(math.hypot(x3 - x0, y3 - y0)*math.hypot(x2 - x0, y2 - y0)))
            b1 = beta(x3 - x0, y3 - y0, x1 - x0, y1 - y0)
            b2 = beta(x3 - x0, y3 - y0, x2 - x0, y2 - y0)
            b3 = beta(x1 - x0, y1 - y0, x2 - x0, y2 - y0)
            div = lambda b: math.fabs(b/phi - round(b/phi)) < EPS

            last = 0.5*float(r)*float(r)*math.sin(phi)*float(i)

            if div(b1) and div(b2) and div(b3):
                print(last)
                mark = True
                break

        j -= 1
    if mark:
        break

    i += 1

if not mark:
    print(last)
# I'm so dumb.....................

import math

Ax, Ay = map(float, input().split())
Bx, By = map(float, input().split())
Cx, Cy = map(float, input().split())

D = 2 * (Ax * (By - Cy) + Bx * (Cy - Ay) + Cx * (Ay - By))

DA = Ax * Ax + Ay * Ay
DB = Bx * Bx + By * By
DC = Cx * Cx + Cy * Cy

Ux = (DA * (By - Cy) + DB * (Cy - Ay) + DC * (Ay - By)) / D
Uy = (DA * (Cx - Bx) + DB * (Ax - Cx) + DC * (Bx - Ax)) / D

R2A = (Ax - Ux) * (Ax - Ux) + (Ay - Uy) * (Ay - Uy)
R2B = (Bx - Ux) * (Bx - Ux) + (By - Uy) * (By - Uy)
R2C = (Cx - Ux) * (Cx - Ux) + (Cy - Uy) * (Cy - Uy)

R2 = (R2A + R2B + R2C) / 3

phiA = math.atan2(Ay - Uy, Ax - Ux)
phiB = math.atan2(By - Uy, Bx - Ux)
phiC = math.atan2(Cy - Uy, Cx - Ux)

phiAB = phiA - phiB
phiBC = phiB - phiC
phiCA = phiC - phiA

eps = 1e-5

n = 3
while n <= 100:
    phi = 2. * math.pi / n

    nAB = phiAB / phi
    nBC = phiBC / phi
    nCA = phiCA / phi

    nAB -= round(nAB)
    nBC -= round(nBC)
    nCA -= round(nCA)

    if (abs(nAB) < eps) and (abs(nBC) < eps) and (abs(nCA) < eps):
        S = 0.5 * n * R2 * math.sin(2. * math.pi / n)
        print('%.8f' % S)
        break

    n += 1

from decimal import Decimal
from math import atan2, pi, sin

EPS = Decimal(1e-5)
pi = Decimal(pi)

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

    def __neg__(self):
        return Vector(-self.x, -self.y)

    def __xor__(self, v2):
        return Decimal(abs(atan2(self | v2, self & v2)))

    def __and__(self, v2):
        return self.x * v2.x + self.y * v2.y

    def __or__(self, v2):
        return self.x * v2.y - self.y * v2.x

p = [list(map(Decimal, input().split())) for x in range(3)]
ca, ab, bc = [Vector(p[i][0] - p[i - 1][0], p[i][1] - p[i - 1][1]) for i in range(3)]
angles = [-ca ^ ab, -ab ^ bc, -bc ^ ca]
R_sq = (ab.x ** Decimal(2) + ab.y ** Decimal(2)) / Decimal(sin(angles[2])) ** Decimal(2) / Decimal(4)
n = Decimal(3)
# print(*(180 * angle / pi for angle in angles))
while n < 101 and any(k for k in (angle * n / pi for angle in angles) if abs(k - int(k + EPS)) >= EPS):
    # print(n, *(k for k in ((pi - angle) * n / Decimal(2) / pi for angle in angles)))
    n += 1
print(n * R_sq * Decimal(sin(Decimal(2) * pi / n)) / Decimal(2))

from math import sqrt, sin, acos, pi

dist_sq = lambda A, B: (A[0] - B[0])**2 + (A[1] - B[1])**2

def angle(R, A, B):
    c = dist_sq(A, B)
    a = dist_sq(R, B)
    b = dist_sq(R, A)
    cosine = round((a + b - c)/sqrt(4 * a * b), 8)
    return acos(cosine)

def circumcentre(A, B, C):
    a = dist_sq(B, C)
    b = dist_sq(A, C)
    c = dist_sq(A, B)
    bary = (
        a * (b + c - a),
        b * (c + a - b),
        c * (a + b - c),
    )
    x = (bary[0] * A[0] + bary[1] * B[0] + bary[2] * C[0])/sum(bary)
    y = (bary[0] * A[1] + bary[1] * B[1] + bary[2] * C[1])/sum(bary)
    return (x, y)

def div(m, n):
    m, n = max(m, n), min(m, n)
    return abs(round(m/n) - m/n) < 10**-4

def gcd(a, b):
    a, b = max(a, b), min(a, b)
    if div(a, b):
        return b
    else:
        return gcd(b, a-b)

A = tuple(map(float, input().split()))
B = tuple(map(float, input().split()))
C = tuple(map(float, input().split()))
cir = circumcentre(A, B, C)
R = dist_sq(cir, A)

angles = sorted([angle(cir, A, B), angle(cir, B, C), angle(cir, C, A)])
gamma = gcd(angles[0], angles[1])
for i in range(1, 51):
	if(div(2*pi*i, gamma)):
		gamma /= i
		break
print(pi * R * sin(gamma)/gamma)

from math import *
p =[list(map(float,input().split())) for i in range(3)]
a,b,c=[hypot(x1-x2,y1-y2) for (x1,y1),(x2,y2) in [(p[0],p[1]),(p[0],p[2]),(p[1],p[2])]]
A,B,C=[acos((y*y+z*z-x*x)/2/z/y) for x,y,z in [(a,b,c),(b,c,a),(c,a,b)]]
R=a/2/sin(A)
def g(x,y):return x if y<1e-3 else g(y,fmod(x,y))
u=2*g(A,g(B,C))
print(round(R * R * pi / u * sin(u),7))

import math

def xyline(x1, y1, x2, y2):
    return (y1 - y2), (x2 - x1), -((x2 - x1) * y1 + (y1 - y2) * x1)

def sujick(a, b, c, x, y):
	return b, -a, (a * y - b * x)

def kyojum(a1, b1, c1, a2, b2, c2):
	return (-(c1 * b2 - b1 * c2) / (a1 * b2 - b1 * a2),
		-(a1 * c2 - c1 * a2) / (a1 * b2 - b1 * a2))

def oishim(x1,y1,x2,y2,x3,y3):
	return kyojum(
		*sujick(*xyline(x1, y1, x2, y2), (x1 + x2) / 2, (y1 + y2) / 2),
		*sujick(*xyline(x1, y1, x3, y3), (x1 + x3) / 2, (y1 + y3) / 2))

def fgcd(a,b):
	while math.fabs(b) > math.pi / 100:
		a, b = b, math.fmod(a, b)
	return a

x1,y1 = map(float, input().split())
x2,y2 = map(float, input().split())
x3,y3 = map(float, input().split())

xoi, yoi = oishim(x1,y1,x2,y2,x3,y3)
rad1 = math.atan2(y1-yoi, x1-xoi)
rad2 = math.atan2(y2-yoi, x2-xoi)
rad3 = math.atan2(y3-yoi, x3-xoi)

angle = math.fabs(fgcd(fgcd(rad1-rad2, rad2-rad3), rad3-rad1))
n = math.pi * 2 / angle
newn = n
while math.fabs(newn - round(newn)) > 1e-2:
	newn += n
n = newn
angle = math.pi * 2 / n
result = (((x1 - xoi) ** 2 + (y1 - yoi) ** 2)
	* math.sin(angle/2) * math.cos(angle/2) * n)
print('%.6f' % result)

import math
import sys

a, b = map(float, input().split())
c, d = map(float, input().split())
e, f = map(float, input().split())
p = c - a
q = d - b
r = c*c + d*d - a*a - b*b
s = e - a
t = f - b
u = e*e + f*f - a*a - b*b
y0 = (p*u - r*s) / (2*(p*t - q*s))
x0 = (r - 2*q*y0) / (2*p)
radius = math.sqrt((x0 - a)**2 + (y0 - b)**2)
print(y0, x0, file=sys.stderr)
print(math.hypot(a - x0, b - y0), file=sys.stderr)
print(math.hypot(c - x0, d - y0), file=sys.stderr)
print(math.hypot(e - x0, f - y0), file=sys.stderr)
dx = a - x0
dy = b - y0
angles = list(map(lambda t: math.atan2(*t),
    [ (b - y0, a - x0), (d - y0, c - x0), (f - y0, e - x0) ]))
angle_i = (2 * math.pi + angles[1] - angles[0]) % (2 * math.pi)
angle_j = (2 * math.pi + angles[2] - angles[0]) % (2 * math.pi)
if angle_i > angle_j:
    angle_i, angle_j = angle_j, angle_i
ratio = angle_j / angle_i
print(angle_i, angle_j, ratio, file=sys.stderr)

for j in range(2, 101):
    for i in range(1, j):
        r = j / i
        if abs(r - ratio) > 1e-5:
            continue
        n = round(2 * math.pi * i / angle_i)
        slice = 2 * math.pi / n
        if abs(round(angle_i / slice) - angle_i / slice) > 1e-5:
            continue
        if abs(round(angle_j / slice) - angle_j / slice) > 1e-5:
            continue
        print(n, i, j, angle_i / slice, angle_j / slice, file=sys.stderr)
        area = radius ** 2 * n * \
                math.sin(math.pi / n) * math.cos(math.pi / n)
        print(area)
        sys.exit()

from math import sqrt, asin, pi, sin, cos

eps = 1e-6

def dist2(ax, ay, bx, by):
    return (ax-bx)**2 + (ay-by)**2

def cross_prod(ax, ay, bx, by):
    return ax*by - ay*bx

def inner_prod(ax, ay, bx, by):
    return ax*bx + ay*by

def find(x, y, s, c):
    for i in range(len(s)):
        if abs(x-s[i]) < eps and abs(y-c[i]) < eps:
            return True
    return False

def pool(x):
    if abs(x) < eps:
        return 1.
    if x < 0:
        return x/pi+2
    return x/pi

def main():
    Ax, Ay = map(float, input().split())
    Bx, By = map(float, input().split())
    Cx, Cy = map(float, input().split())

    #print(Ax, Ay, Bx, By, Cx, Cy)

    #for _ in range(n):
    #   print(ans(input()))

    D = 2*(Ax*(By-Cy) + Bx*(Cy-Ay) + Cx*(Ay-By))
    Ox = ( (Ax**2+Ay**2)*(By-Cy) + (Bx**2+By**2)*(Cy-Ay) + (Cx**2+Cy**2)*(Ay-By) ) / D
    Oy = ( (Ax**2+Ay**2)*(Cx-Bx) + (Bx**2+By**2)*(Ax-Cx) + (Cx**2+Cy**2)*(Bx-Ax) ) / D

    R2 = dist2(Ox,Oy,Ax,Ay)
    #print(R)
    #print(Ox, Oy)
    #print(dist(Ox,Oy,Ax,Ay))
    #print(dist(Ox,Oy,Bx,By))
    #print(dist(Ox,Oy,Cx,Cy))
    s1 = cross_prod(Ax-Ox,Ay-Oy,Bx-Ox,By-Oy)/R2
    c1 = inner_prod(Ax-Ox,Ay-Oy,Bx-Ox,By-Oy)/R2
    s2 = cross_prod(Ax-Ox,Ay-Oy,Cx-Ox,Cy-Oy)/R2
    c2 = inner_prod(Ax-Ox,Ay-Oy,Cx-Ox,Cy-Oy)/R2

    #angle1 = pool(angle1)
    #angle2 = pool(angle2)

    #print([s1, s2])
    #print([c1, c2])

    for n in range(3, 101):
        x = list(range(n))
        for j in range(len(x)):
            x[j] = x[j] * (2*pi/n)
        s = list(map(sin, x))
        c = list(map(cos, x))
        #print(s)
        #print(c)
        #print(find(s1, c1, s, c))
        #print(find(s2, c2, s, c))
        if find(s1, c1, s, c) and find(s2, c2, s, c):
            area = .5*n*R2*sin(2*pi/n)
            print("%.8f" % area)
            break

if __name__ == "__main__":
    main()

#!/usr/bin/env python
# kristof.jakab@gmail.com
# -*- coding: utf-8 -*-

# http://www.darrensun.com/codeforces-round-1/

# ---------------------------------------
import math

# ---------------------------------------
class Point(object):
    """ """
    def __init__(self, x, y):
        self.x = x
        self.y = y
        self.vabs = math.sqrt(x ** 2 + y ** 2)

class Line(object):
    """ """
    def __init__(self, A, B):
        self.direction = Point(B.x - A.x, B.y - A.y)
        self.length = math.sqrt((B.x - A.x) ** 2 + (B.y - A.y) ** 2)

class Angle(object):
    """ """
    def __init__(self, vertex, point_1, point_2):
        self.opposite = Line(point_1, point_2).length
        self.ray_1 = Line(vertex, point_1).length
        self.ray_2 = Line(vertex, point_2).length
        self.calculate_angle()

    def calculate_angle(self):  # law of cosines
        numr = self.ray_1 ** 2 + self.ray_2 ** 2 - self.opposite ** 2
        denr = 2 * self.ray_1 * self.ray_2
        self.angle = math.acos(numr / denr)

class Triangle(object):
    """ """
    def __init__(self, A=None, B=None, C=None):
        # vertices
        self.A = A
        self.B = B
        self.C = C
        # sides
        self.a = Line(B, C).length
        self.b = Line(A, C).length
        self.c = Line(A, B).length
        # angles
        self.alpha = Angle(A, B, C).angle
        self.beta = Angle(B, A, C).angle
        self.gamma = Angle(C, A, B).angle
        # radius of circumscribed circle
        self.R = self.calculate_R()

    def calculate_R(self):  # Heron's formula
        s = (self.a + self.b + self.c) / 2
        A = math.sqrt(s * (s-self.a) * (s-self.b) * (s - self.c))
        return (self.a * self.b * self.c) / (4 * A)

# ---------------------------------------
def gcd(p, q):  # Greatest Common Divisor
    while(math.fabs(p) > 0.0001 and math.fabs(q) > 0.0001):
        # print p, q
        if p > q:
            p -= math.floor(p / q) * q
        else:
            q -= math.floor(q / p) * p
    return p + q

# ----------------------------------------
def main():
    A = Point(*map(float, raw_input().split()))
    B = Point(*map(float, raw_input().split()))
    C = Point(*map(float, raw_input().split()))

    triangle = Triangle(A, B, C)

    # calculate least number of vertices
    n = math.pi / gcd(gcd(triangle.alpha, triangle.beta), triangle.gamma)

    # area of polygon
    print "%.6f" % float(n / 2 * (triangle.R ** 2) * math.sin(2 * math.pi / n))

    return 0

if __name__ == '__main__':
    main()

import math
import sys

a, b = map(float, input().split())
c, d = map(float, input().split())
e, f = map(float, input().split())
p = c - a
q = d - b
r = c*c + d*d - a*a - b*b
s = e - a
t = f - b
u = e*e + f*f - a*a - b*b
y0 = (p*u - r*s) / (2*(p*t - q*s))
x0 = (r - 2*q*y0) / (2*p)
radius = math.sqrt((x0 - a)**2 + (y0 - b)**2)
print(y0, x0, file=sys.stderr)
print(math.hypot(a - x0, b - y0), file=sys.stderr)
print(math.hypot(c - x0, d - y0), file=sys.stderr)
print(math.hypot(e - x0, f - y0), file=sys.stderr)
dx = a - x0
dy = b - y0
angles = list(map(lambda t: math.atan2(*t),
    [ (b - y0, a - x0), (d - y0, c - x0), (f - y0, e - x0) ]))
angle_i = (2 * math.pi + angles[1] - angles[0]) % (2 * math.pi)
angle_j = (2 * math.pi + angles[2] - angles[0]) % (2 * math.pi)
if angle_i > angle_j:
    angle_i, angle_j = angle_j, angle_i
ratio = angle_j / angle_i
print(angle_i, angle_j, ratio, file=sys.stderr)

for n in range(3, 101):
    slice = 2 * math.pi / n
    if abs(round(angle_i / slice) - angle_i / slice) > 1e-5:
        continue
    if abs(round(angle_j / slice) - angle_j / slice) > 1e-5:
        continue
    for j in range(2, n + 1):
        for i in range(1, j):
            r = j / i
            if abs(r - ratio) > 1e-5:
                continue
            print(n, i, j, angle_i / slice, angle_j / slice, file=sys.stderr)
            area = radius ** 2 * n * \
                    math.sin(math.pi / n) * math.cos(math.pi / n)
            print(area)
            sys.exit()

from math import *
def g(x,y):
    if y<1e-3:
        return x
    else:
        return g(y,fmod(x,y))
p=[list(map(float,input().split())) for i in range(3)]
a,b,c=[hypot(x1-x2,y1-y2) for (x1,y1),(x2,y2) in [(p[0],p[1]),(p[0],p[2]),(p[1],p[2])]]
A,B,C=[acos((y*y+z*z-x*x)/2/z/y) for x,y,z in [(a,b,c),(b,c,a),(c,a,b)]]
R=a/2/sin(A)
u=2*g(A,g(B,C))
print(round(R*R*pi/u*sin(u),7))

#!/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)

import math

def gcd(a,b):

	if b < 1e-3:

		return a

	else:

		return gcd(b,math.fmod(a,b))

p=[[float(x) for x in raw_input().split(' ')] for y in range(0,3)]

a,b,c=[math.hypot(x1-x2,y1-y2) for (x1,y1),(x2,y2) in [(p[0],p[1]),(p[1],p[2]),(p[0],p[2])]]

A,B,C=[math.acos((a*a+b*b-c*c)/(2*a*b)) for a,b,c in [(b,c,a),(a,c,b),(a,b,c)]]

r=a/(2*math.sin(A))

ang=2*gcd(A,gcd(B,C))

ans=2*math.acos(-1)/ang*1/2*r*r*math.sin(ang)

print(round(ans,12))

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

# C. Ancient Berland Circus
# time limit per test2 seconds
# memory limit per test64 megabytes
# inputstandard input
# outputstandard output
# 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.

# Sample test(s)
# input
# 0.000000 0.000000
# 1.000000 1.000000
# 0.000000 1.000000
# output
# 1.00000000

import math

# 最大公约数
def gcd(a, b):
	if a > b:
		a, b = b, a
	while b > 0:
		b = b % a
	return a

# 已知(x1, y1)和(x2, y2)求过该两点的直线方程Ax + By + C = 0
def point2line(x1, y1, x2, y2):
	xm = (float(x1) + x2) / 2
	ym = (float(y1) + y2) / 2
	if x1 == x2:
		A = 0
		B = 1
		C = -ym
	elif y1 == y2:
		A = 1
		B = 0
		C = -xm
	else:
		A = (x2 - x1)
		B = (y2 - y1)
		C = (x1 - x2) * xm - (y2 - y1) * ym
	return A, B, C

# 已知两直线的一般式方程，求交点
def linecross(A1, B1, C1, A2, B2, C2):
	if A1 == 0:
		yr = -float(C1) / B1
		xr = -(B2 * yr + C2) / A2
	else:
		yr = (float(A2) * C1 - A1 * C2) / (A1 * B2 - A2 * B1)
		xr = -(B1 * yr + C1) / A1
	return xr, yr

# 已知两向量，求夹角的余弦
def vectorcos(x1, y1, x2, y2):
	norm1 = math.sqrt(x1 * x1 + y1 * y1)
	norm2 = math.sqrt(x2 * x2 + y2 * y2)
	return (x1 * x2 + y1 * y2) / (norm1  * norm2)

x = [0, 0, 0]
y = [0, 0, 0]
midx = [0, 0]
midy = [0, 0]
A = [0, 0]
B = [0, 0]
C = [0, 0]
x[0], y[0] = map(float, raw_input().split(" "))
x[1], y[1] = map(float, raw_input().split(" "))
x[2], y[2] = map(float, raw_input().split(" "))
for i in range(2):
	A[i], B[i], C[i] = point2line(x[i], y[i], x[i + 1], y[i + 1])
rx, ry = linecross(A[0], B[0], C[0], A[1], B[1], C[1])

x.append(x[0])
y.append(y[0])
mintheta = 1e15
r2 = (x[0] - rx) * (x[0] - rx) + (y[0] - ry) * (y[0] - ry)
theta = []
for i in range(3):
	v1x = x[i] - rx
	v1y = y[i] - ry
	v2x = x[i + 1] - rx
	v2y = y[i + 1] - ry
	costheta = vectorcos(v1x, v1y, v2x, v2y)
	theta.append(math.acos(costheta))
	if theta[i] < mintheta:
		mintheta = theta[i]

div = 1
while 1:
	ltheta = mintheta / div
	canbediv = True
	for i in range(3):
		divi = theta[i] / ltheta
		if abs(round(divi) - divi) > 1e-4:
			canbediv = False
			break

		divi = (2 * math.pi - theta[i]) / ltheta
		if abs(round(divi) - divi) > 1e-4:
			canbediv = False
			break
	if canbediv:
		break
	else:
		div += 1
poly = int(round(math.pi / mintheta * 2 * div))

area = poly * r2 * math.sin(mintheta / div) / 2
print(area)

from sys import stdin,stdout
import math
import fractions
def gcd(a,b):
  if b<1e-3:
    return a
  else:
    return gcd(b,math.fmod(a,b))
x1,y1=[float(x)for x in stdin.readline().rstrip().split()]
x2,y2=[float(x)for x in stdin.readline().rstrip().split()]
x3,y3=[float(x)for x in stdin.readline().rstrip().split()]
a=math.hypot(x2-x3,y2-y3)
b=math.hypot(x1-x3,y1-y3)
c=math.hypot(x1-x2,y1-y2)
s=(a+b+c)/2
ar=math.sqrt(s*(s-a)*(s-b)*(s-c))
R=a*b*c/4/ar
A=math.acos((pow(b,2)+pow(c,2)-pow(a,2))/(2*b*c))
B=math.acos((pow(c,2)+pow(a,2)-pow(b,2))/(2*c*a))
C=math.acos((pow(a,2)+pow(b,2)-pow(c,2))/(2*a*b))
angle=gcd(A,gcd(B,C))
stdout.write(str(pow(R,2)*math.sin(2*angle)*math.pi/angle/2)+'\n')

import math

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

def circle(p1, p2, p3):
    # http://blog.csdn.net/lijiayu2015/article/details/52541730
#     A1 = 2 * p2.x - 2 * p1.x
#     A2 = 2 * p3.x - 2 * p2.x
#     B1 = 2 * p1.y - 2 * p2.y
#     B2 = 2 * p2.y - 2 * p3.y
#     C1 = p1.y ** 2 + p2.x ** 2 - p1.x ** 2 - p2.y ** 2
#     C2 = p2.y ** 2 + p3.x ** 2 - p2.x ** 2 - p3.y ** 2

#     temp = A1 * B2 - A2 * B1

#     print(p1, p2, p3)
#     print(A1, A2, B1, B2, C1, C2, temp)

    x21 = p2.x - p1.x
    x31 = p3.x - p1.x
    y21 = p2.y - p1.y
    y31 = p3.y - p1.y
    M1 = p1.x ** 2 + p1.y ** 2 - p2.x ** 2 - p2.y ** 2
    M2 = p1.x ** 2 + p1.y ** 2 - p3.x ** 2 - p3.y ** 2

    x = (y21 * M2 - y31 * M1) / 2 / (y31 * x21 - y21 * x31)
    y = (x21 * M2 - x31 * M1) / 2 / (x31 * y21 - x21 * y31)

#     x = (C1 * B2 - C2 * B1) / temp
#     y = (A1 * C2 - A2 * C1) / temp

    return x, y

def calAngle(center, p1, p2):
    va = Point(p1.x - center.x, p1.y - center.y)
    vb = Point(p2.x - center.x, p2.y - center.y)

    la = (va.x ** 2 + va.y ** 2) ** 0.5
    lb = (vb.x ** 2 + vb.y ** 2) ** 0.5

    cosAngle = round((va.x * vb.x + va.y * vb.y) / (la * lb), 6)
    angle = math.acos(cosAngle) * 180 / math.pi
    return angle

def isMultiple(a, b):
    c = a / b
#     print(c - int(c))
    return abs(c - round(c)) < 0.001

def solve(p1, p2, p3):
    center = Point(*circle(p1, p2, p3))
#    print(center.x, center.y)
    a1 = calAngle(center, p1, p2)
    a2 = calAngle(center, p1, p3)
    a3 = calAngle(center, p2, p3)
#     print(a1, a2, a3)

    for n in range(3, 101):
        angle = 360 / n
#         print(n, angle)
        if all(isMultiple(a, angle) for a in (a1, a2, a3)):
            break
    v1 = Point(center.x - p1.x, center.y - p1.y)
    radius = (v1.x ** 2 + v1.y ** 2) ** 0.5
    area = 0.5 * radius * radius * math.sin(angle * math.pi / 180)
    area *= n
    return area

p1 = Point(*map(float, input().split()))
p2 = Point(*map(float, input().split()))
p3 = Point(*map(float, input().split()))
print(solve(p1, p2, p3))

from math import*
p=[map(float,raw_input().split()) for i in range(3)]
a,b,c=[hypot(x1-x2,y1-y2) for (x1,y1),(x2,y2) in [(p[0],p[1]),(p[0],p[2]),(p[1],p[2])]]
A,B,C=[acos((y*y+z*z-x*x)/2/z/y) for x,y,z in [(a,b,c),(b,c,a),(c,a,b)]]
R=a/2/sin(A)
def g(x,y):return x if y<1e-3 else g(y,fmod(x,y))
u=2*g(A,g(B,C))
print R*R*pi/u*sin(u)

x1, y1 = map(float, raw_input().split())
x2, y2 = map(float, raw_input().split())
x3, y3 = map(float, raw_input().split())
import math
##x1 = 71.756151; y1 = 7.532275
##x2 = -48.634784; y2 = 100.159986
##x3 = 91.778633; y3 = 158.107739

##x1 = 0.0; y1 = 0.0
##x2 = 0.0; y2 = 1.0
##x3 = math.sqrt(3); y3 = 1.0

EPSILON = 0.00001
def midPoint(x1, y1, x2, y2):
    mid_x = (x1 + x2) / 2
    mid_y = (y1 + y2) / 2
    return (mid_x, mid_y)

def slope_mid_perpend(x1, y1, x2, y2):
    return -1 * (x2 - x1) / (y2 - y1)

def distance(x1, y1, x2, y2):
    return math.sqrt((x1-x2) ** 2 + (y1-y2) ** 2)

def circleCenter(x1, y1, x2, y2, x3, y3):
    x12, y12 = midPoint(x1, y1, x2, y2)
    x13, y13 = midPoint(x1, y1, x3, y3)
    if y1 == y2:
        k_mid_13 = slope_mid_perpend(x1, y1, x3, y3)
        x0 = x12
        y0 = k_mid_13 * (x0 - x13) + y13
    elif y1 == y3:
        k_mid_12 = slope_mid_perpend(x1, y1, x2, y2)
        x0 = x13
        y0 = k_mid_12 * (x0 - x12) + y12
    else:
        k_mid_13 = slope_mid_perpend(x1, y1, x3, y3)
        k_mid_12 = slope_mid_perpend(x1, y1, x2, y2)
        x0 = (y13 - y12 + k_mid_12*x12 - k_mid_13*x13) / (k_mid_12 - k_mid_13)
        y0 = k_mid_13 * (x0 - x13) + y13
    return x0, y0
x0, y0 = circleCenter(x1, y1, x2, y2, x3, y3)
def angle(distance1, distance2):
    angle = math.asin((distance1/2) / distance2)
    return 2 * angle
d_12 = distance(x1, y1, x2, y2)
d_13 = distance(x1, y1, x3, y3)
d_32 = distance(x3, y3, x2, y2)
##print d_12, d_13, d_32
r = distance(x1, y1, x0, y0)

angle1O2 = angle(d_12, r)
angle1O3 = angle(d_13, r)
angle3O2 = angle(d_32, r)
##print angle1O2, angle1O3, angle3O2

##print angle1O2, angle1O3, angle3O2
##
##print angle(math.sqrt(2), 1)

def isRemainder(angle, angle_N):
    remainder = angle % angle_N
##    print remainder

    if (abs(remainder - 0)<= EPSILON) or (abs(remainder - angle_N) <= EPSILON):
        return True
    else:
        return False

def find_N(angle1, angle2, angle3):
    N = 3
    while 1:
##        print angle1, angle1, angle3
        angle_N = 2 * math.pi / N
##        print 'angle_N', angle_N
##        remainder1 = angle1 % angle_N
##        remainder2 = angle2 % angle_N
##        remainder3 = angle3 % angle_N
##        print remainder1, remainder2, remainder3
        if  (isRemainder(angle1, angle_N) and  isRemainder(angle2, angle_N) and
             isRemainder(angle2, angle_N)):
            break
        N += 1

    return N
N = find_N(angle1O2, angle1O3, angle3O2)
def area_N(N):
    angle = 2 * math.pi / N
    area = N * 0.5 * r * r * math.sin(angle)
    return area

print area_N(N)

##print angle1O3, 2 * math.pi / 6
##print angle1O3 % (2 * math.pi / 6)

## test
##print circleCenter(x1, y1, x2, y2, x3, y3)
##
##import math
##
##x0, y0 = circleCenter(x1, y1, x2, y2, x3, y3)
##print distance(x0, y0, x1, y1), distance(x0, y0, x2, y2), distance(x0, y0, x2, y2)

from math import pi, fmod, fabs, atan2, sin

pi2 = 2.0 * pi
min_angle = pi2 / 100.0
eps_deeps = 3
eps = 1.0 / pow(10.0, eps_deeps)

def nod(n, m):
    if n < min_angle / 2.0:
        return m
    else:
        return nod(fmod(m, n), n)

x1, y1 = map(float, raw_input().split())
x2, y2 = map(float, raw_input().split())
x3, y3 = map(float, raw_input().split())

# Find normals at centers of [(x1, y1)-(x2, y2)] and [(x2, y2)-(x3, y3)]
if y1 - y2 != 0.0:
    an12 = (x2 - x1) / (y1 - y2)
    bn12 = (y1 + y2) / 2.0 - an12 * (x1 + x2) / 2.0
else:
    an12 = None
    bn12 = (x1 + x2) / 2.0
if y2 - y3 != 0.0:
    an23 = (x3 - x2) / (y2 - y3)
    bn23 = (y2 + y3) / 2.0 - an23 * (x2 + x3) / 2.0
else:
    an23 = None
    bn23 = (x2 + x3) / 2.0

# Intersection of normals is circle center.
if an12 is not None and an23 is not None:
    x0 = (bn23 - bn12) / (an12 - an23)
    y0 = an12 * x0 + bn12
elif an12 is None:
    x0 = bn12
    y0 = an23 * x0 + bn23
else:
    x0 = bn23
    y0 = an12 * x0 + bn12

# Relocate center to (0, 0)
x1 -= x0
y1 -= y0
x2 -= x0
y2 -= y0
x3 -= x0
y3 -= y0

# Find radius
r2 = x2 * x2 + y2 * y2

# Calculate angles
angle1 = atan2(y1, x1)
angle2 = atan2(y2, x2)
angle3 = atan2(y3, x3)

angle12 = fabs(angle1 - angle2)
angle23 = fabs(angle2 - angle3)
angle13 = fabs(angle1 - angle3)

# Find angle between radiuses to nearby vertices
side_angle = nod(*sorted((nod(*sorted((angle12, angle23))), angle13)))

modulo = fmod(pi2 / side_angle + eps / 2.0, 1.0) - eps / 2.0
if fabs(modulo) > eps:
    for i in xrange(1, 102):
        if fmod(round(i / modulo, eps_deeps), 1.0) < eps:
            break
    side_angle *= modulo / i
    if side_angle < min_angle:
        side_angle = min_angle

# Find n of our n-gon
n = round(pi2 / side_angle)

# Finally calculate n-gon area
s = n * r2 * sin(pi2 / n) / 2.0

print "{0:.8f}".format(s)

from math import *

def gcd_new (p, q):
    if (q < 1e-4):
        return p
    return gcd_new(q, fmod(p, q))

x1, y1 = map(float, raw_input().split())
x2, y2 = map(float, raw_input().split())
x3, y3 = map(float, raw_input().split())

a = sqrt((x1 - x2)**2 + (y1 - y2)**2)
b = sqrt((x2 - x3)**2 + (y2 - y3)**2)
c = sqrt((x3 - x1)**2 + (y3 - y1)**2)
s = float(a + b + c)/2
L = sqrt(s*(s - a)*(s - b)*(s - c))
r = float(a*b*c)/float(4*L)

aa = float(acos(float(b**2 + c**2 - a**2)/float(2*b*c)))
bb = float(acos(float(c**2 + a**2 - b**2)/float(2*c*a)))
cc = float(acos(float(a**2 + b**2 - c**2)/float(2*a*b)))
n = pi/gcd_new(aa, gcd_new(bb, cc))
ans = float(n*r*r*sin(float(2*pi)/n))/2

print (ans)

__author__ = 'asmn'
from math import sqrt, atan2, pi, sin
from functools import reduce

x, y = [0] * 3, [0] * 3
for i in range(3):
    x[i], y[i] = tuple(map(float, input().split()))

def center(x, y, n):
    return (sum(x[i] * x[i] * (y[i - 1] - y[i - 2]) for i in range(3)) + (y[0] - y[1]) * (y[1] - y[2]) * (
    y[2] - y[0])) / sum(2 * x[i] * (y[i - 1] - y[i - 2]) for i in range(3))

cx, cy = center(x, y, 3), center(y, x, 3)

r = sqrt((x[1] - cx) ** 2 + (y[1] - cy) ** 2)

th = list(map(lambda x, y: atan2(y - cy, x - cx), x, y))

def check(na, a):
    k = na / a
    return abs(k - round(k)) < 1e-4

for n in range(3, 101):
    if check(th[2] - th[0], 2 * pi / n) and check(th[1] - th[0], 2 * pi / n):
        print(n * r * r * sin(2 * pi / n) / 2)
        break

from math import hypot,acos,pi,sin,fmod

def gcd(a,b):
    if b<pi/100: return a
    return gcd(b,fmod(a,b))

p=[map(float,raw_input().split()) for i in range(3)]

a,b,c=[hypot(x[0]-y[0],x[1]-y[1]) for x,y in[(p[0],p[1]),(p[1],p[2]),(p[2],p[0])]]
ua,ub,uc=[acos((y**2+z**2-x**2)/(2*y*z)) for x,y,z in [(a,b,c),(b,c,a),(c,a,b)]]

R=a/(2*sin(ua))
u=2*gcd(ua,gcd(ub,uc))

print R**2*pi/u*sin(u)

from math import *

def gcd(a, b): return a if b < pi/100 else gcd(b, fmod(a, b))

p = [map(float, raw_input().split()) for i in xrange(3)]
a, b, c = [hypot((x2-x1), (y2-y1)) for (x1, y1), (x2, y2) in [(p[0], p[1]), (p[1], p[2]), (p[2], p[0])]]
ta, tb, tc = [acos((y*y+z*z-x*x)/2.0/y/z) for x, y, z in [(a, b, c), (b, c, a), (c, a, b)]]
R = a/2.0/sin(ta)
t = 2.0*gcd(ta, gcd(tb, tc))
print R**2*pi/t*sin(t)

import math

x1, y1 = map(float, input().split())
x2, y2 = map(float, input().split())
x3, y3 = map(float, input().split())

def compute_triangle_area(x1, y1, x2, y2, x3, y3):
    return abs((x2 - x1) * (y3 - y1) - (x3 - x1) * (y2 - y1)) / 2

a, b, c = (math.hypot(x2 - x1, y2 - y1),
           math.hypot(x3 - x2, y3 - y2),
           math.hypot(x1 - x3, y1 - y3))
R = (a * b * c / (4 * compute_triangle_area(x1, y1, x2, y2, x3, y3)))
A, B, C = (math.acos((b ** 2 + c ** 2 - a ** 2) / (2 * b * c)),
           math.acos((a ** 2 + c ** 2 - b ** 2) / (2 * a * c)),
           math.acos((a ** 2 + b ** 2 - c ** 2) / (2 * a * b)))

def float_gcd(a, b, tol = 1e-04):
    t = min(abs(a), abs(b))
    while abs(b) > tol:
        a, b = b, a % b
    return a

n = math.pi / float_gcd(float_gcd(A, B), C)
S = n * R ** 2 * math.sin(2 * math.pi / n) / 2

print(S)

import math
from fractions import Fraction
line = input()
data = line.split()
x1, y1 = float(data[0]), float(data[1])
line = input()
data = line.split()
x2, y2 = float(data[0]), float(data[1])
line = input()
data = line.split()
x3, y3 = float(data[0]), float(data[1])
dis12 = (x1 - x2) * (x1 - x2) + (y1 - y2) * (y1 - y2)
dis23 = (x2 - x3) * (x2 - x3) + (y2 - y3) * (y2 - y3)
dis13 = (x1 - x3) * (x1 - x3) + (y1 - y3) * (y1 - y3)
'''
print(dis12)
print(dis13)
print(dis23)
'''
cos1 = (dis13 + dis12 - dis23) / (2 * math.sqrt(dis12 * dis13))
cos2 = (dis23 + dis12 - dis13) / (2 * math.sqrt(dis23 * dis12))
cos3 = (dis13 + dis23 - dis12) / (2 * math.sqrt(dis13 * dis23))
'''
print('*',cos1)
print('*',cos2)
print('*',cos3)
'''
angle1 = math.acos(cos1) * 2
angle2 = math.acos(cos2) * 2
angle3 = math.acos(cos3) * 2
'''
print('#',angle1)
print('#',angle2)
print('#',angle3)
'''
number1 = Fraction.from_float(angle1 / angle2).limit_denominator(101)
#print(number1.numerator)
#print(number1.denominator)
l1 = angle1 / number1.numerator
#print(l1)
n1 = 2 * math.pi / l1
n1_int = int(n1 + 0.5)
#print(n1_int)

number2 = Fraction.from_float(angle1 / angle3).limit_denominator(101)
#print(number2.numerator)
#print(number2.denominator)
l2 = angle1 / number2.numerator
#print(l2)
n2 = 2 * math.pi / l2
n2_int = int(n2 + 0.5)
#print(n2_int)

if abs(n1_int - n1) < abs(n2_int - n2):
    n = n1_int
else:
    n = n2_int

sin1 = math.sqrt(1 - cos1 * cos1)
#print(sin1)
#print(dis23)
r = math.sqrt(dis23) / (2 * sin1)
#print(r)
area = 1 / 2 * n * math.sin(2 * math.pi / n) * r * r
print('%.6f' % area)

import math
import sys

eps = 1e-4

def gcd(x, y):
    while (abs(x) > eps and abs(y) > eps):
        if (x>y):
            x -= math.floor(x/y) * y
        else:
            y -= math.floor(y/x) * x
    return x+y

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

A = Coordinate(*map(float, raw_input().split()))
B = Coordinate(*map(float, raw_input().split()))
C = Coordinate(*map(float, raw_input().split()))

a = math.sqrt((B.x-C.x)**2 + (B.y-C.y)**2)
b = math.sqrt((A.x-C.x)**2 + (A.y-C.y)**2)
c = math.sqrt((A.x-B.x)**2 + (A.y-B.y)**2)

s = (a+b+c)/2
T = math.sqrt(s*(s-a)*(s-b)*(s-c))

R = a*b*c / (4*T)

a_A = math.acos((b*b+c*c-a*a)/(2*b*c))
a_B = math.acos((a*a+c*c-b*b)/(2*a*c))
a_C = math.acos((a*a+b*b-c*c)/(2*a*b))

a_n = gcd(a_A, gcd(a_B, a_C))
n = round(math.pi/a_n, 0)

print R*R*math.sin(2*math.pi/n)*n/2

#input

lst = input().split()
ax, ay = map(float, lst)
lst = input().split()
bx, by = map(float, lst)
lst = input().split()
cx, cy = map(float, lst)

#solve

import math

ab2 = (ax-bx)*(ax-bx) + (ay-by)*(ay-by)
bc2 = (bx-cx)*(bx-cx) + (by-cy)*(by-cy)
ca2 = (cx-ax)*(cx-ax) + (cy-ay)*(cy-ay)
ab = math.sqrt(ab2)
bc = math.sqrt(bc2)
ca = math.sqrt(ca2)
p = (ab+bc+ca)/2
s = math.sqrt( p*(p-ab)*(p-bc)*(p-ca) )
r = ab*bc*ca / (4*s)
A = math.acos( (ab2+ca2-bc2)/(2*ab*ca) )
B = math.acos( (ab2+bc2-ca2)/(2*ab*bc) )
C = math.acos( (bc2+ca2-ab2)/(2*bc*ca) )
d = 0.00001 #误差
count = 3 #default not useful
sinth = 0.0
minth = math.pi/100 - d
for i in range(1, 100):
    th = A/i
    if (th < minth):
        break #no
    if ( abs((B+d)//th*th-B)<d and abs((C+d)//th*th-C)<d ):
        count = (math.pi+d)//th
        sinth = math.sin(th*2)
        break
ss = 0.5*r*r*sinth*count
print("%.6f" % ss)

from math import *

kordinat = [list(map(float, input().split())) for i in range(3)]
a, b, c = [hypot(x1 - x2, y1 - y2) for (x1, y1), (x2, y2) in [
    (kordinat[0], kordinat[1]), (kordinat[0], kordinat[2]), (kordinat[1],kordinat[2])
    ]]
A, B, C = [acos((z * z + y * y - x * x) / 2 / y / z) for x,y,z in [(a,b,c), (b,c,a), (c,a,b)]]
Radius = a / (2 * sin(A))
def g(x, y):
    if y < 1e-3:
        return x
    else:
        return g(y, fmod(x, y))
u = 2 * g(A,g(B, C))
Area = round((pi * Radius * Radius * sin(u)) / (u), 7)
print(Area)

import math
# get edge for the triangle

def getEgde(x1, y1, x2, y2):
    ans = math.sqrt(pow((x1-x2), 2) + pow((y1-y2), 2))
    return ans

# greatest common divisor

def gcd(x, y):
    if x < esp:
        return y
    if y < esp:
        return x

    return gcd(y, math.fmod(x, y))

# main
# init
x = [0]*3
y = [0]*3
esp = 0.01

for i in range(0, 3):
    cord = input().split()
    x[i] = float(cord[0])
    y[i] = float(cord[1])

# get three edges for the triangle
a = getEgde(x[0], y[0], x[1], y[1])
b = getEgde(x[0], y[0], x[2], y[2])
c = getEgde(x[2], y[2], x[1], y[1])

# Heron formula
p = (a+b+c) / 2
s = math.sqrt(p * (p-a) * (p-b) * (p-c))

# get radius of circle
r = (a * b * c) / (4 * s)

# get angle of each edge
angle = [0] * 3
# control precision, otherwise will get a math domain error on math.asin()
a = float("%.9f" % a)
b = float("%.9f" % b)
c = float("%.9f" % c)
r = float("%.9f" % r)

angle[0] = 2 * math.asin(a / (2*r))
angle[1] = 2 * math.asin(b / (2*r))
angle[2] = 2 * math.pi-angle[0]-angle[1]
aver = angle[0]

i = 1
for i in range(0, 3):
    aver = gcd(aver, angle[i])

n = 2 * math.pi / aver
area = r*r * math.sin(aver) / 2

print("%.8f" % (n*area))

import math

x1, y1 = map(eval, raw_input().split())
x2, y2 = map(eval, raw_input().split())
x3, y3 = map(eval, raw_input().split())

a = ((x2 - x1) ** 2 + (y2 - y1) ** 2) ** 0.5
b = ((x3 - x1) ** 2 + (y3 - y1) ** 2) ** 0.5
c = ((x3 - x2) ** 2 + (y3 - y2) ** 2) ** 0.5

cos_a = (b**2 + c**2 - a**2) / 2.0 / b / c
cos_b = (a**2 + c**2 - b**2) / 2.0 / a / c
cos_c = (a**2 + b**2 - c**2) / 2.0 / a / b

def is_multiple(angel, cos):
    eps = 1e-4
    t = angel
    while t < math.pi:
        if abs(math.cos(t) - cos) < eps:
            return True
        t += angel
    return False

for k in range(3, 101):
    A = math.pi / k
    if is_multiple(A, cos_a) and is_multiple(A, cos_b) and is_multiple(A, cos_c):
        r = a / 2 / math.sin(math.acos(cos_a))
        s = r * math.sin(A) * r * math.cos(A)
        print s * k
        break

import math

EPS = 1e-4

def gcd(a, b):

	while abs(a) > EPS and abs(b) > EPS:

		if a > b:

			a -= math.floor(a/b)*b

		else:

			b -= math.floor(b/a)*a

	return a+b

def dist(x0, y0, x1, y1):

	return math.sqrt((x0-x1)**2+(y0-y1)**2)

x0, y0 = map(float, raw_input().split())

x1, y1 = map(float, raw_input().split())

x2, y2 = map(float, raw_input().split())

s = abs(x0*y1+x1*y2+x2*y0-y0*x1-y1*x2-y2*x0)/2

a = dist(x0, y0, x1, y1)

b = dist(x0, y0, x2, y2)

c = dist(x1, y1, x2, y2)

r = (a*b*c)/(4*s)

A = math.acos((b**2+c**2-a**2)/(2*b*c))

B = math.acos((a**2+c**2-b**2)/(2*a*c))

C = math.acos((a**2+b**2-c**2)/(2*a*b))

t = gcd(gcd(A, B), C)

n = math.pi/t

print (n/2)*(r**2)*math.sin(2*math.pi/n)

import math
from sys import stdin
from decimal import Decimal

def get_length(p1, p2):
    return Decimal.sqrt((p1[0] - p2[0]) ** 2 + (p1[1] - p2[1]) ** 2)

def get_angle(p1, p2, p3):
    a = (p1[0] - p2[0]) ** 2 + (p1[1] - p2[1]) ** 2
    b = (p2[0] - p3[0]) ** 2 + (p2[1] - p3[1]) ** 2
    c = (p1[0] - p3[0]) ** 2 + (p1[1] - p3[1]) ** 2
    return math.acos((a + c - b) / (2 * get_length(p1, p2) * get_length(p1, p3)))

def get_radius(p1, p2, p3):
    a, b, c = get_length(p1, p2), get_length(p2, p3), get_length(p1, p3)
    s = (a + b + c) / 2
    area = Decimal.sqrt(s * (s - a) * (s - b) * (s - c))
    return a * b * c / 4 / area

def gcd(x, y):
    while abs(y) > 0.01 and abs(x) > 0.01:
        if x > y:
            x -= Decimal.from_float(math.floor(x / y)) * y
        else:
            y -= Decimal.from_float(math.floor(y / x)) * x
    return x + y

def main():
    x1, y1 = map(Decimal.from_float, map(float, stdin.readline().strip().split()))
    p1 = (x1, y1)
    x2, y2 = map(Decimal.from_float, map(float, stdin.readline().strip().split()))
    p2 = (x2, y2)
    x3, y3 = map(Decimal.from_float, map(float, stdin.readline().strip().split()))
    p3 = (x3, y3)
    A = Decimal.from_float(get_angle(p1, p2, p3))
    B = Decimal.from_float(get_angle(p2, p3, p1))
    C = Decimal.from_float(get_angle(p3, p2, p1))
    radius = get_radius(p1, p2, p3)
    n = Decimal.from_float(round(Decimal.from_float(math.pi) / gcd(gcd(A, B), C)))
    area =  n / 2 * \
            radius ** 2 * \
            Decimal.from_float(math.sin(2 * Decimal.from_float(math.pi) / n))
    print(area)

if __name__ == "__main__":
    main()

"""
Codeforces
1C - Ancient Berland Circus
http://codeforces.com/problemset/problem/1/C

Héctor González Belver
11/06/2018
"""
import sys
import math

def float_gcd(a, b, rtol = 0, atol = 1e-05):
    t = min(abs(a), abs(b))
    while abs(b) > rtol * t + atol:
        a, b = b, a % b
    return a

def main():
  point_A = [float(x) for x in sys.stdin.readline().strip().split()]
  point_B = [float(x) for x in sys.stdin.readline().strip().split()]
  point_C = [float(x) for x in sys.stdin.readline().strip().split()]

  #Triangle
  side_a = math.hypot(point_B[0] - point_C[0], point_B[1] - point_C[1])
  side_b = math.hypot(point_A[0] - point_C[0], point_A[1] - point_C[1])
  side_c = math.hypot(point_A[0] - point_B[0], point_A[1] - point_B[1])

  #Semiperimeter of the triangle
  semiperimeter_T = (side_a + side_b + side_c)/2

  #Area of triangle: Heron's formula
  area_T = (semiperimeter_T*(semiperimeter_T - side_a)*(semiperimeter_T - side_b)*(semiperimeter_T - side_c))**0.5

  #Angles of triangle: Law of cosines
  angle_A = math.acos((side_b**2 + side_c**2 - side_a**2)/(2*side_b*side_c))
  angle_B = math.acos((side_a**2 + side_c**2 - side_b**2)/(2*side_a*side_c))
  angle_C = math.acos((side_a**2 + side_b**2 - side_c**2)/(2*side_a*side_b))

  #Circumradius (R) of the triangle = circumradius of possible convex regular n-gons
  R = (side_a*side_b*side_c)/(4*area_T)

  #Angles of the triangle are inscribed angles of circumcircle with center O --> inscribed angles theorem: relates the measure of an inscribed angle to that of the central angle subtending the same arc
  #-->angle_BOC = 2*angle_A
  #-->angle_AOC = 2*angle_B
  #-->angle_AOB = 2*angle_C

  #Central angle of convex regular n-gon = 2*pi/n
  #--> angle_BOC = i * 2*pi/n ==> angle_A = i * pi/n
  #--> angle_AOC = j * 2*pi/n ==> angle_B = j * pi/n
  #--> angle_AOB = k * 2*pi/n ==> angle_C = k * pi/n
  #i + j + k = n ( i,j,k,n positive integers)
  #==>mimimum area==>minimum n==> gcd(angle_A, angle_B, angle_C) = pi/n
  #==>n=pi/gcd(angle_A, angle_B, angle_C)
  n = math.pi/float_gcd(float_gcd(angle_A, angle_B), angle_C)

  #Area of convex regular n-gons by circumradius
  A = (math.sin(2*math.pi/n)*n*R**2)/2

  sys.stdout.write("{:.6f}".format(A)+"\n")

if __name__ == '__main__':
  main()

from math import *
v = lambda a, b: (b[0] - a[0], b[1] - a[1])
l = lambda a, b: hypot(*v(a, b))
cross = lambda a, b: a[0] * b[1] - a[1] * b[0]
def angle(a, b, c):
  v1, v2 = v(b, a), v(b, c)
  res = abs(atan2(v1[1], v1[0]) - atan2(v2[1], v2[0]))
  return min(2 * pi - res, res)
a, b, c = [map(float, raw_input().split()) for _ in range(3)]
la, lb, lc = l(a, b), l(b, c), l(a, c)
A, B, C = angle(a, c, b), angle(b, a, c), angle(a, b, c)
S = fabs(cross(v(a, b), v(a, c))) / 2
R = (la * lb * lc) / (4 * S)
def fgcd(a, b):
  return a if b < pi / 100 else fgcd(b, fmod(a, b))
t = 2 * fgcd(A, fgcd(B, C))
n = (2 * pi) / t
print (pi * R * R * sin(t)) / t

from sys import stdin, stdout
import math

def find_radius(a,b,c):
    e=math.sqrt((a+b+c)*(b+c-a)*(a+c-b)*(a+b-c))
    r=(a*b*c)/e
    return r

def length(x,y):
    return math.sqrt(x**2+y**2)

def dot(x1,y1,x2,y2):
    return x1*x2+y1*y2

def find_angles(x1,y1,x2,y2,x3,y3):
    ax=x2-x1
    ay=y2-y1
    bx=x3-x1
    by=y3-y1
    cx=x3-x2
    cy=y3-y2
    theta1=math.acos((dot(ax,ay,bx,by)/(length(ax,ay)*length(bx,by))))
    theta2=math.acos((dot(-ax,-ay,cx,cy)/(length(ax,ay)*length(cx,cy))))
    theta3=math.acos((dot(-bx,-by,-cx,-cy)/(length(cx,cy)*length(bx,by))))
    theta1=2*theta1
    theta2=2*theta2
    theta3=2*theta3
    return theta1,theta2,theta3

def equal(x,y):
    if abs(x-y)<=0.0001:
        return True
    return False

def gcd(x,y):
    if x<y:
        return gcd(y,x)
    else:
        a=int(x/y)
        if equal(0,x-a*y):
            return y
        else:
            return gcd(y,x-a*y)

def main(x1,y1,x2,y2,x3,y3):
    t1,t2,t3=find_angles(x1,y1,x2,y2,x3,y3)
    t=gcd(gcd(t1,t2),t3)
    n1=(t1/t)
    n2=(t2/t)
    n3=(t3/t)
    n=n1+n2+n3
    a=length(x2-x1,y2-y1)
    b=length(x3-x1,y3-y1)
    c=length(x3-x2,y3-y2)
    r=find_radius(a,b,c)
    return n*0.5*math.sin(t)*(r**2)

def parse(myString):
    i=0
    l=len(myString)
    while myString[i]!=" ":
        i+=1
    string1=myString[0:i]
    string2=myString[i+1:l-1]
    return float(string1),float(string2)

a=[0,0,0,0,0,0]
i=0
for j in range(3):
    cell=stdin.readline()
    parse(cell)
    a[i],a[i+1]=parse(cell)
    i+=2
area=main(a[0],a[1],a[2],a[3],a[4],a[5])
print area

from __future__ import division, print_function
from math import acos, fmod, pi, sin, hypot
input = raw_input

# MAIN------------------------------------------------------------------------#

def gcd(a, b): return a if b < pi/100 else gcd(b, fmod(a, b))

def main():
    p = [map(float, input().split()) for i in xrange(3)]
    a, b, c = [hypot((x2-x1), (y2-y1)) for (x1, y1), (x2, y2) in [(p[0], p[1]), (p[1], p[2]), (p[2], p[0])]]
    ta, tb, tc = [acos((y*y+z*z-x*x)/2.0/y/z) for x, y, z in [(a, b, c), (b, c, a), (c, a, b)]]
    R = a/2.0/sin(ta)
    t = 2.0*gcd(ta, gcd(tb, tc))
    print(R**2*pi/t*sin(t))

if __name__ == '__main__':
    main()

#!/usr/bin/env python
#coding=utf-8
# from error202
import math
def gcd(a,b):
    if b < math.pi/100:return a
    return gcd(b, math.fmod(a,b))

p = [map(float,raw_input().split()) for i in range(3)]

a,b,c = [math.hypot(x[0]-y[0],x[1] - y[1])\
                   for x,y in [(p[0],p[1]),(p[1],p[2]),(p[2],p[0])]]

ua,ub,uc = [math.acos((y**2 + z**2 - x**2)/(2*y*z))\
           for x,y,z in [(a,b,c),(b,c,a),(c,a,b)]]

R = a/(2*math.sin(ua))
u = 2 * gcd(ua,gcd(ub,uc))

print R ** 2 * math.pi / u * math.sin(u)

#CF1c
import math

def fequal(x,y):
    return (math.fabs(x-y) < (math.pi/100))

def gcd(a,b):

    if fequal(b,0):
        return a
    if fequal(a,0):
        return b
    else:
        return gcd(b,a%b)

def main():
    x1,y1 = raw_input().split()
    x1 = float(x1)
    y1 = float(y1)
    x2,y2 = raw_input().split()
    x2 = float(x2)
    y2 = float(y2)
    x3,y3 = raw_input().split()
    x3 = float(x3)
    y3 = float(y3)

    a = math.sqrt(math.pow((x1-x2),2)+ math.pow((y1-y2),2))
    b = math.sqrt(math.pow((x2-x3),2)+ math.pow((y2-y3),2))
    c = math.sqrt(math.pow((x3-x1),2)+ math.pow((y3-y1),2))
    p = (a+b+c)/2
    #heron
    S = math.sqrt(p*(p-a)*(p-b)*(p-c))
    R = a*b*c/(4*S)

    if a > c:
        k = a
        a = c
        c = k
    if b > c :
        k = b
        b = c
        c = k

    A = 2 * math.asin(a/(2*R))
    B = 2 * math.asin(b/(2*R))
    C = 2 * math.pi - A - B
    P = gcd(A,B)
    P = gcd(P,C)
    print((math.pi*R*R*math.sin(P))/P)

#-------
if __name__ == '__main__':
    main()

import sys
import math

N = 1000

def find_circle_center(p1, p2, p3):
    (x1, y1) = p1
    (x2, y2) = p2
    (x3, y3) = p3
    # the perpendicular bisectors linear function is either
    # A*x + B*y = B * y_mid + A * x_mid, or x = x_mid when y_1 == y_2
    # where A = x_2 - x_1 and B = y_2 - y_1
    # The rest part is just solving two linear systems
    # See: https://stackoverflow.com/questions/20677795/how-do-i-compute-the-intersection-point-of-two-lines-in-python

    def average(a, b): return (a + b) / 2
    # Line 1: the p1-p2 perpendicular
    x_mid1 = average(x1, x2); y_mid1 = average(y1, y2)
    if y1 == y2:
        L1 = (1, 0, -x_mid1)
    else:
        A1 = x2 - x1; B1 = y2 - y1;
        C1 = B1 * y_mid1 + A1 * x_mid1
        L1 = (A1, B1, -C1)

    x_mid2 = average(x2, x3); y_mid2 = average(y2, y3)
    if y2 == y3:
        L2 = (1, 0, -x_mid2)
    else:
        A2 = x3 - x2; B2 = y3 - y2;
        C2 = B2 * y_mid2 + A2 * x_mid2
        L2 = (A2, B2, -C2)

    xp = intersection(L1, L2)
    if xp:
        return xp
    print("No single Intersection point detected.")
    return False

# def line(p1, p2):
#    A = (p1[1] - p2[1])
#    B = (p2[0] - p1[0])
#    C = (p1[0]*p2[1] - p2[0]*p1[1])
#    return A, B, -C

def intersection(L1, L2):
    D  = L1[0] * L2[1] - L1[1] * L2[0]
    Dx = L1[2] * L2[1] - L1[1] * L2[2]
    Dy = L1[0] * L2[2] - L1[2] * L2[0]
    if D != 0:
        x = Dx / D
        y = Dy / D
        return -x, -y
    else:
        return False

def distance(p1, p2):
    return math.sqrt(pow((p2[0] - p1[0]), 2) +
        pow((p2[1] - p1[1]), 2))

def near_integer(num):
    u = math.ceil(num);
    l = math.floor(num);
    return math.isclose(u, num, rel_tol=1e-04) \
        or math.isclose(l, num, rel_tol=1e-04)

def main():
    ps = []
    # fin = open('input.txt', 'r')
    # for line in fin.readlines():
    for line in sys.stdin:
        (a, b) = line.split(' ')
        ps.append((float(a), float(b)))
    center = find_circle_center(ps[0], ps[1], ps[2])
    R = distance(center, ps[0])

    def center_angle(line):
        # Using The Law of Sines
        # Center_angle without the Pi part
        p1, p2 = line
        return 2 * math.asin(distance(p1, p2) / R * 0.5) / math.pi

    Theta = list(map(center_angle, [(ps[0], ps[1]), (ps[1], ps[2]), (ps[2], ps[0])]))
    # find the smallest value of n that gives a near-integer value of s
    n = 0
    for n in range(3, N+1):
        # s = 2 * R * math.sin(math.pi / n)
        div_result = [x * n / 2 for x in Theta]
        if all([near_integer(x) for x in div_result]):
            break
        else:
            continue
    if n == 0:
        print("Error: input invalid.")
        return
    area = 1 / 2 * n * R * R * math.sin(2 * math.pi / n)
    print("%.6f" % area)
    return area

def test():
    p1 = (0.0, 0.0)
    p2 = (0.5, 0.5 * math.sqrt(3))
    p3 = (1.0, 0.0)
    p4 = (1.0, 1.0)

    p5 = (71.756151, 7.532275)
    p6 = (-48.634784, 100.159986)
    p7 = (91.778633, 158.107739)

#test()
main()

from math import *
def gcd(x, y):
    return x if y < 1e-3 else gcd(y, fmod(x,y))

p = [[float(i) for i in input().split()] for _ in range(3)]
a, b, c = [hypot(x1-x2, y1-y2) for ([x1,y1], [x2,y2]) in [(p[0], p[1]), (p[0], p[2]), (p[1], p[2])]]
A, B, C = [acos((y*y+z*z-x*x)/2/y/z) for (x,y,z) in [(a,b,c), (b,c,a), (c,a,b)]]

R = a/2/sin(A)
theta = 2*gcd(A, gcd(B,C))
print(R*R*sin(theta)*pi/theta)

import math
from sys import stdin
# from fractions import gcd

def dist(x1, y1, x2, y2):
    return math.sqrt((x1-x2)**2 + (y1-y2)**2)

def angle(a, b, c):
    return math.acos((b**2 + c**2 - a**2) / (2*b*c))

def gcd(a, b):
    while abs(a - b) > 0.01:
        if a > b:
            a -= b
        else:
            b -= a
    return round(a, 6)

d = []
a = []
s = list(map(lambda x: list(map(float, x.split(' '))), stdin.readlines()))
d.append(dist(s[0][0], s[0][1], s[1][0], s[1][1]))
d.append(dist(s[0][0], s[0][1], s[2][0], s[2][1]))
d.append(dist(s[1][0], s[1][1], s[2][0], s[2][1]))
a.append(angle(d[0], d[1], d[2]))
a.append(angle(d[1], d[2], d[0]))
a.append(angle(d[2], d[0], d[1]))
n = round(math.pi / gcd(gcd(a[0], a[1]), a[2]))
p = sum(d) / 2
R = d[0]*d[1]*d[2] / (4 * math.sqrt(p * (p-d[0]) * (p-d[1]) * (p-d[2])))
print round(0.5 * n * math.sin(2*math.pi / n) * R**2, 7)

from sys import stdin
from math import *
from functools import lru_cache, reduce
input = stdin.readline

dist = lambda a, b: sqrt((a[0] - b[0]) ** 2 + (a[1] - b[1]) ** 2)
dgcd = lambda a, b: a if b < 1e-4 else dgcd(b, a) if a < b else dgcd(b, a - a // b * b)
dege = lambda a, b, c: acos((b ** 2 + c ** 2 - a ** 2) / (2 * b * c))

ap, bp, cp = map(tuple, map(lambda i: map(float, input().split()), range(3)))
a, b, c = map(dist, [bp, cp, ap], [cp, ap, bp])
A, B, C = map(dege, [a, b, c], [b, c, a], [c, a, b])
p = (a + b + c) / 2
S = sqrt(p * (p - a) * (p - b) * (p - c))
R = a * b * c / (4 * S)
n = round(pi / reduce(dgcd, [A, B, C]))
Res = n / 2 * R * R * sin(pi * 2 / n)
print(f"{Res:.6f}")

from math import *

def rt(x0, y0):
    return sum((i - j) ** 2 for i, j in zip(x0, y0))

def tr(a0, b0, c0):
    return acos((b0 + c0 - a0) / (2 * (b0 * c0) ** 0.5)) / pi

def trt(x0, n0):
    return 0.01 < (x0 * n0) % 1 < 0.99

x0, y0, z0 = (tuple(map(float, input().split())) for i in range(3))
a0, b0, c0 = rt(x0, y0), rt(x0, z0), rt(y0, z0)
t0, s0 = tr(a0, b0, c0), tr(b0, a0, c0)
r0, n0 = a0 / (8 * sin(t0 * pi) ** 2), 3
while trt(t0, n0) or trt(s0, n0):
    n0 += 1
print(n0 * r0 * sin(2 * pi / n0))

from math import *
p=[map(float,raw_input().split()) for i in [0]*3]
a,b,c=[hypot(x-X,y-Y) for (x,y),(X,Y) in [(p[0],p[1]),(p[1],p[2]),(p[0],p[2])]]
A,B,C=[acos((y*y+z*z-x*x)/2/z/y) for x,y,z in [(a,b,c),(b,c,a),(c,a,b)]]
R=a/2/sin(A)
def g(x,y):
    if y < pi/100: return x
    return g(y,fmod(x,y))
u=2*g(A,g(B,C))
print R*R*pi/u*sin(u)

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

"""
http://codeforces.com/problemset/problem/1/C

C. Ancient Berland Circus
time limit per test
2 seconds
memory limit per test
64 megabytes
input
standard input
output
standard output

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.
Sample test(s)
Input

0.000000 0.000000
1.000000 1.000000
0.000000 1.000000

Output

1.00000000

"""

import math

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

    def GetDistance(self, p2):
        dx = self.x - p2.x
        dy = self.y - p2.y
        return math.sqrt(dx*dx+dy*dy)

    def __str__(self):
        return '['+str(self.x)+','+str(self.y)+']'

class LineEquation(object):
    def __init__(self, p1, p2):
        self.type = 0 # 0: general form, 1: vertical line, 2: horizontal line
        self.p1 = p1
        self.p2 = p2
        if p1.x == p2.x:
            self.type = 1 # vertial
            self.x = p1.x
        elif p1.y == p2.y:
            self.type = 2 # horizontal
            self.y = p1.y
        else:
            self.type = 0
            self.slope = (p2.y-p1.y)/(p2.x-p1.x)
            self.intercept = p2.y-self.slope*p2.x
            #print "%f %f   %f %f   %f %f"%(p1.x, p1.y, p2.x, p2.y, self.slope, self.intercept)

    def GetMidperpendicular(self):
        result = None
        mid_x = (self.p1.x+self.p2.x)/2
        mid_y = (self.p1.y+self.p2.y)/2
        if self.type == 1:
            result = LineEquation(Point(0, mid_y), Point(1, mid_y))
        elif self.type == 2:
            result = LineEquation(Point(mid_x, 0), Point(mid_x, 1))
        else:
            slope = -1/self.slope
            result = LineEquation(Point(mid_x, mid_y), Point(mid_x-1, mid_y-slope))
        return result

    def GetCrossPoint(self, line):
        x = 0
        y = 0
        if (self.type == 1 and line.type == 1) \
            or (self.type == 2 and line.type == 2) \
            or (self.type == 0 and line.type == 0 and (self.slope - line.slope < 0.0000001)):
                return None
        if self.type == 1:
            x = self.x
            y = line.slope*x+line.intercept
        elif line.type == 1:
            return line.GetCrossPoint(self)
        elif self.type == 2:
            y = self.y
            x = (y-line.intercept)/line.slope
        elif line.type == 2:
            return line.GetCrossPoint(self)
        else:
            x = (line.intercept-self.intercept)/(self.slope-line.slope)
            y = line.slope*x+line.intercept
        return Point(x,y)

    def __str__(self):
        if self.type == 0:
            return 'y=' + str(self.slope) + '*x+' + str(self.intercept)
        elif self.type == 1:
            return 'x=' + str(self.x)
        else:
            return 'y=' + str(self.y)

def get_area_with_herons_formula(a, b, c):
    p = (a+b+c)/2
    s = math.sqrt(p*(p-a)*(p-b)*(p-c))
    return s

def get_radius(a, b, c, s):
    return a*b*c/(4*s)

def get_radian_of_triangle_with_low_of_cosines(a, b, c):
    r1 = math.acos((b**2+c**2-a**2)/(2*b*c))
    r2 = math.acos((c**2+a**2-b**2)/(2*c*a))
    r3 = math.acos((a**2+b**2-c**2)/(2*b*a))
    return r1, r2, r3

def get_gcd(a, b):
    if b < math.pi/100:
        return a
    return get_gcd(b, math.fmod(a, b))

if __name__ == "__main__":

    coords = raw_input().split()
    p1 = Point(float(coords[0]), float(coords[1]))
    coords = raw_input().split()
    p2 = Point(float(coords[0]), float(coords[1]))
    coords = raw_input().split()
    p3 = Point(float(coords[0]), float(coords[1]))

    #p1 = Point(p[0][0], p[0][1])
    #p2 = Point(p[1][0], p[1][1])
    #p3 = Point(p[2][0], p[2][1])
    a = p1.GetDistance(p2)
    b = p2.GetDistance(p3)
    c = p3.GetDistance(p1)
    s = get_area_with_herons_formula(a, b, c)
    r = get_radius(a, b, c, s)
    r1, r2, r3 = get_radian_of_triangle_with_low_of_cosines(a, b, c)
    r = a/2.0/math.sin(r1)
    rgcd = 2.0*get_gcd(r1, get_gcd(r2, r3))
    result = r*r*math.sin(rgcd)/2*(2*math.pi/rgcd)
    #print a, b, c, r, r1, r2, r3, rgcd
    print ("%.6f"%result)
    #l = LineEquation(Point(0,1), Point(1,0))
    #print l
    #l = LineEquation(Point(1,1), Point(1,0))
    #print l
    #print l.GetMidperpendicular()
    #l = LineEquation(Point(1,1), Point(0,1))
    #print l
    #l = LineEquation(Point(0,1), Point(2,0))
    #print l
    #l = LineEquation(Point(0,1), Point(3,0))
    #print l
    #print l.GetMidperpendicular()
    #l = LineEquation(Point(0,0), Point(1,1))
    #l2 = LineEquation(Point(0,1), Point(1,1))
    #print l, l.GetMidperpendicular()
    #print l2, l2.type, l2.GetMidperpendicular(), l2.GetMidperpendicular().type
    #print l.GetCrossPoint(l2)
    #print l.GetMidperpendicular().GetCrossPoint(l2.GetMidperpendicular())
    #print Point(0,0).GetDistance(l.GetMidperpendicular().GetCrossPoint(l2.GetMidperpendicular()))

import math
def getlen(a,b):
    return math.sqrt((a[0]-b[0])*(a[0]-b[0])+(a[1]-b[1])*(a[1]-b[1]))
def dmul(a,b):
    return a[0]*b[0]+a[1]*b[1]
def tlen(a):
    return math.sqrt(a[0]*a[0]+a[1]*a[1])
lst=[]
for i in range(3):
    lst.append(map(float, raw_input().split()))
thea=[]
r=0
for i in range(3):
    v=[]
    for j in range(3):
        if j!=i:
            v.append([lst[j][0]-lst[i][0],lst[j][1]-lst[i][1]])
    ta=math.acos(dmul(v[0],v[1])/tlen(v[0])/tlen(v[1]))
    thea.append(ta)
    if i==0:
        r=tlen([lst[1][0]-lst[2][0],lst[1][1]-lst[2][1]])/2/math.sin(ta)
thea.sort()
for i in range(1,100):
    t=thea[0]/i
    ret=(math.pi/t)*r*math.sin(2*t)*r/2
    for j in range(1,3):
        f=math.fmod(thea[j],t)
        if 1e-6<f<t-1e-6:
            break
    else:
        break
print "%.8lf"%ret

from math import*
p=[map(float,raw_input().split()) for i in range(3)]
a,b,c=[hypot(x1-x2,y1-y2) for (x1,y1),(x2,y2) in [(p[0],p[1]),(p[0],p[2]),(p[1],p[2])]]
A,B,C=[acos((y*y+z*z-x*x)/2/z/y) for x,y,z in [(a,b,c),(b,c,a),(c,a,b)]]
R=a/2/sin(A)
def g(x,y):return x if y<1e-3 else g(y,fmod(x,y))
u=2*g(A,g(B,C))
print R*R*pi/u*sin(u)

import math

A = map(float,raw_input().strip().split())
B = map(float,raw_input().strip().split())
C = map(float,raw_input().strip().split())

def is_close(a, b, tol=1e-9):
        return abs(a-b) <= tol

def calculateDistance(x1, y1, x2, y2) :
    return math.sqrt( (x2-x1)**2 + (y2-y1)**2 )

def calculateAreaOfTriangle(a,b,c) :
    semiPerimeter = (a+b+c)/2
    return math.sqrt(semiPerimeter * (semiPerimeter - a) * (semiPerimeter - b) * (semiPerimeter -c))

def calculateCircumRadius1(a,b,c,areaOfTriagnle) :
    return (a * b * c)/areaOfTriagnle

def calculateCircumRadius(sideLength, alpha) :
    return sideLength/(2*math.sin(alpha))

def calculateAngle(adjacentSide1, adjacentSide2, oppositeSide) :
    """ This function calculates the angle of a triangle using the sides of it. Uses Law Of Cosines.

    Arguments:
        adjacentSide1 {[int]} -- [One of the sides which has got vertice which contains this point]
        adjacentSide2 {[int]} -- [One of the sides which has got vertice which contains this point]
        oppositeSide {[int]} -- [The side opposite to the angle which needs to be calculated. This side doesn't contain the center vertex of the angle being calculated.]
    """

    angle = math.acos((adjacentSide1**2 + adjacentSide2**2 - oppositeSide**2)/(2*adjacentSide1*adjacentSide2))
    return angle

def gcd(x,y,eps = 0.001) :
    while math.fabs(x) > eps and math.fabs(y) > eps:
        if x > y :
            x = x - (math.floor(x/y)*y)
        else :
            y = y - (math.floor(y/x)*x)
    return x+y

def calculateSidesOfPolygon(A,B,C) :
    """This calculates the number of sides of an equiangular regular polygon given 3 angles of the 3 random points.

    Arguments:
        A {[float]} -- [1st angle in radians formed by the triangle]
        B {[float]} -- [2nd angle in radians formed by the triangle]
        C {[float]} -- [3rd angle in radians formed by the triangle]
    """
    sides = 1/(gcd((A/math.pi),gcd((B/math.pi),(C/math.pi))))
    return sides

def calculateApothem(sideLength,sides) :
    """Calculates Apothem of a regular polygon

    Arguments:
        circumRadius {[float]} -- Circumradius of the polygon
        sides {[int]} -- The number of sides of the polygon
    """
    return sideLength/(2*math.tan(math.pi/sides))

def calculateAreaOfPolygon(circumRadius,numberOfSides) :
    """Calculates the area of an equiangular regular n sided polygon with given circumradius

    Arguments:
        sides {int} -- The number of sides in the polygon
        circumRadius {float} -- The circumradius of the polygon
    """
    area = numberOfSides*0.5*((circumRadius**2) * math.sin((2*math.pi)/numberOfSides))
    return area

AB = calculateDistance(A[0],A[1],B[0],B[1])
BC = calculateDistance(B[0],B[1],C[0],C[1])
AC = calculateDistance(A[0],A[1],C[0],C[1])

sidesOfTriangle = [AB,BC,AC]
sidesOfTriangle.sort()

angleA = calculateAngle(AB,AC,BC)
angleB = calculateAngle(AB,BC,AC)
angleC = math.pi - angleA - angleB

minimumSides = round(calculateSidesOfPolygon(angleA,angleB,angleC))

areaOfTriangle = calculateAreaOfTriangle(AB,BC,AC)

circumRadius = calculateCircumRadius(BC,angleA)

print calculateAreaOfPolygon(circumRadius,minimumSides)

import math
def SC(a,b):
    return a[0]*b[0]+a[1]*b[1]
def LN(a):
    d=math.sqrt(a[0]*a[0]+a[1]*a[1])
    return d
def AR(a,b):
    d=math.acos((SC(a,b)/LN(a)/LN(b)))
    return d
def gcd(x,y):
    while y!=0: x,y=y,x%y
    return x
def lcm(x,y):
    return x*y/gcd(x,y)
_IsSquare=False
x1,y1=input().split()
x1,y1=float(x1),float(y1)
x2,y2=input().split()
x2,y2=float(x2),float(y2)
x3,y3=input().split()
x3,y3=float(x3),float(y3)
a=[x3-x1,y3-y1]
b=[x2-x1,y2-y1]
A=AR(a,b)
if SC(a,b)==0:
    _IsSquare=True
    print(LN(a)*LN(b))
a=[x3-x2,y3-y2]
b=[x1-x2,y1-y2]
B=AR(a,b)
if SC(a,b)==0:
    _IsSquare=True
    print(LN(a)*LN(b))
a=[x1-x3,y1-y3]
b=[x2-x3,y2-y3]
C=AR(a,b)
if SC(a,b)==0:
    _IsSquare=True
    print(LN(a)*LN(b))
if not _IsSquare:
    n1=math.pi/A
    n2=math.pi/B
    n3=math.pi/C

    i=2
    n=0
    while not n and i<=100:
        _1=float(i)/n1
        _2=float(i)/n2
        _3=float(i)/n3
        if float(round(_1,0)-0.02)<=_1<=float(round(_1,0)+0.02) and float(round(_2,0)-0.02)<=_2<=float(round(_2,0)+0.02) and float(round(_3,0)-0.02)<=_3<=float(round(_3,0)+0.02):
            n=i
        i+=1
    a=LN([x2-x1,y2-y1])
    b=LN([x3-x2,y3-y2])
    c=LN([x1-x3,y1-y3])
    p=(a+b+c)/2
    S=math.sqrt(p*(p-a)*(p-b)*(p-c))
    R=(a*b*c)/(4*S)
    if int(a)==int(b)==int(c):
        print(S)
    else: print((float(float(n)/2))*(R**2)*math.sin(2*math.pi/n))

import math

A = map(float,raw_input().strip().split())
B = map(float,raw_input().strip().split())
C = map(float,raw_input().strip().split())

def is_close(a, b, tol=1e-9):
        return abs(a-b) <= tol

def calculateDistance(x1, y1, x2, y2) :
    return math.sqrt( (x2-x1)**2 + (y2-y1)**2 )

def calculateAreaOfTriangle(a,b,c) :
    semiPerimeter = (a+b+c)/2
    return math.sqrt(semiPerimeter * (semiPerimeter - a) * (semiPerimeter - b) * (semiPerimeter -c))

def calculateRadius(sideLength, alpha) :
    return sideLength/(2*math.sin(alpha))

def calculateAngle(adjacentSide1, adjacentSide2, oppositeSide) :
    """ This function calculates the angle of a triangle using the sides of it. Uses Law Of Cosines.

    Arguments:
        adjacentSide1 {[int]} -- [One of the sides which has got vertice which contains this point]
        adjacentSide2 {[int]} -- [One of the sides which has got vertice which contains this point]
        oppositeSide {[int]} -- [The side opposite to the angle which needs to be calculated. This side doesn't contain the center vertex of the angle being calculated.]
    """

    angle = math.acos((adjacentSide1**2 + adjacentSide2**2 - oppositeSide**2)/(2*adjacentSide1*adjacentSide2))
    return angle

def gcd(x,y,eps = 0.001) :
    while math.fabs(x) > eps and math.fabs(y) > eps:
        if x > y :
            x = x - (math.floor(x/y)*y)
        else :
            y = y - (math.floor(y/x)*x)
    return x+y

def calculateSidesOfPolygon(A,B,C) :
    """This calculates the number of sides of an equiangular regular polygon given 3 angles of the 3 random points.

    Arguments:
        A {[float]} -- [1st angle in radians formed by the triangle]
        B {[float]} -- [2nd angle in radians formed by the triangle]
        C {[float]} -- [3rd angle in radians formed by the triangle]
    """
    sides = 1/(gcd((A/math.pi),gcd((B/math.pi),(C/math.pi))))
    return sides

def calculateApothem(sideLength,sides) :
    """Calculates Apothem of a regular polygon

    Arguments:
        circumRadius {[float]} -- Circumradius of the polygon
        sides {[int]} -- The number of sides of the polygon
    """
    return sideLength/(2*math.tan(math.pi/sides))

def calculateAreaOfPolygon(circumRadius,numberOfSides) :
    """Calculates the area of an equiangular regular n sided polygon with given circumradius

    Arguments:
        sides {int} -- The number of sides in the polygon
        circumRadius {float} -- The circumradius of the polygon
    """
    area = numberOfSides*0.5*((circumRadius**2) * math.sin((2*math.pi)/numberOfSides))
    return area

AB = calculateDistance(A[0],A[1],B[0],B[1])
BC = calculateDistance(B[0],B[1],C[0],C[1])
AC = calculateDistance(A[0],A[1],C[0],C[1])

sidesOfTriangle = [AB,BC,AC]
sidesOfTriangle.sort()

angleA = calculateAngle(AB,AC,BC)
angleB = calculateAngle(AB,BC,AC)
angleC = math.pi - angleA - angleB

minimumSides = round(calculateSidesOfPolygon(angleA,angleB,angleC))

areaOfTriangle = calculateAreaOfTriangle(AB,BC,AC)

circumRadius = calculateRadius(BC,angleA)

print calculateAreaOfPolygon(circumRadius,minimumSides)

from math import *

p = [list(map(float, input().split())) for i in range(3)]

a, b, c = [hypot(p[i][0] - p[(i+1)%3][0], p[i][1] - p[(i+1)%3][1]) for i in range(3)]
A, B, C = [acos((y*y+z*z-x*x)/(2*y*z)) for x, y, z in [(a, b, c), (b, c, a), (c, a, b)]]
R = a/sin(A)*0.5
def g(x,y):return x if y<1e-3 else g(y,fmod(x,y))
u=2*g(pi, g(A,g(B,C)))
print(R*R*sin(u)*pi/u)

import math

def compute_triangle_side(p1, p2, p3):
    l1 = ((p2[0] - p3[0])**2 + (p2[1] - p3[1])**2)**(1/2)
    l2 = ((p1[0] - p3[0])**2 + (p1[1] - p3[1])**2)**(1/2)
    l3 = ((p1[0] - p2[0])**2 + (p1[1] - p2[1])**2)**(1/2)

    return (l1, l2, l3)

def compute_circumscribed_circle_radius(l1, l2, l3):
    p = (l1 + l2 + l3) / 2 # half_perimeter for heron
    area = (p * (p - l1) * (p - l2) * (p - l3))**(1 / 2) # area using heron formula
    radius = (l1 * l2 * l3) / (4 * area)

    return radius

def round_float(float_value):
    return math.floor(float_value)

def compute_min_number_of_vertices(radius):
    for n in range(3, 101):
        # area of regular polygon using number of sides and radius of cc
        area = (1/2) * n * radius * radius * math.sin((2 * math.pi) / n)
        print(area)
        if area - round_area(area) <= 0.0001:
            print(n)
            return "{0:.6f}".format(area)

    return ((1/2) * 100 * radius * radius * math.sin((2 * math.pi) / 100))

def compute_side_length(radius):
    min_area = -1
    for n in range(3, 101):
        side_length = 2 * radius * math.sin(math.pi / n)
        print(side_length)
        if side_length - round_float(side_length) <= 0.001:
            return n
    return 100

# def find_min_n(radius, l1, l2, l3):
#     (angle1, angle2, angle3) = compute_angles_to_O(radius, l1, l2, l3)
#     print(angle1, angle2, angle3)
#     for n in range(3, 101):
#         min_section = 2 * math.pi / n
#         print(min_section)
#         angle1_check = False
#         angle2_check = False
#         angle3_check = False
#         for p in range(1, n + 1):
#             curr_angle = p * min_section
#             if curr_angle - angle1 <= 0.0001:
#                 angle1_check = True
#             if curr_angle - angle2 <= 0.0001:
#                 angle2_check = True
#             if curr_angle - angle3 <= 0.0001:
#                 angle3_check = True
#         if angle1_check and angle2_check and angle3_check:
#             return n
#     return 100

# def find_min_n(radius, l1, l2, l3):
#     (angle1, angle2, angle3) = compute_angles_to_O(radius, l1, l2, l3)
#     for n in range(3, 101):
#         min_section = 2 * math.pi / n
#         r1 = angle1 / min_section
#         r2 = angle2 / min_section
#         r3 = angle3 / min_section
#         if r1 - round(r1) <= 0.0001 and r2 - round(r2) <= 0.0001 and r3 - round(r3) <= 0.0001:
#             return n

def compute_gcd(a1, a2):
    if a1 < a2:
        return compute_gcd(a2, a1)

    if abs(a2) < 0.001:
        return a1
    else:
        return compute_gcd(a2, a1 - math.floor(a1 / a2) * a2)

def find_min_n(radius, l1, l2, l3):
    angle1 = math.acos((l2 * l2 + l3 * l3 - l1 * l1) / (2 * l2 * l3))
    angle2 = math.acos((l1 * l1 + l3 * l3 - l2 * l2) / (2 * l1 * l3))
    angle3 = math.acos((l1 * l1 + l2 * l2 - l3 * l3) / (2 * l1 * l2))

    return round(math.pi / compute_gcd(angle2, compute_gcd(angle1, angle3)))

# consider O the center of circumscribed circle, we compute AOC, BOC, AOB
# A, B, C are the given points p1, p2, p3
# R is the radius
def compute_angles_to_O(R, l1, l2, l3):
    angle1 = math.acos((2 * R * R - l1 * l1) / (2 * R * R))
    angle2 = math.acos((2 * R * R - l2 * l2) / (2 * R * R))
    angle3 = math.acos((2 * R * R - l3 * l3) / (2 * R * R))
    return (angle1, angle2, angle3)

if __name__ == "__main__":
    p1 = input().split(" ")
    p1x = float(p1[0])
    p1y = float(p1[1])
    p2 = input().split(" ")
    p2x = float(p2[0])
    p2y = float(p2[1])
    p3 = input().split(" ")
    p3x = float(p3[0])
    p3y = float(p3[1])

    (l1, l2, l3) = compute_triangle_side((p1x, p1y), (p2x, p2y), (p3x, p3y))
    radius = compute_circumscribed_circle_radius(l1, l2, l3)
    min_n = find_min_n(radius, l1, l2, l3)
    # print(min_n)
    area = (1/2) * min_n * radius * radius * math.sin((2 * math.pi) / min_n)
    print(area)

from math import atan2, asin, fmod, pi, sin
def gcd(a,b):
	return a if abs(b)<1e-4 else gcd(b,fmod(a,b))
def alpha(a,b):
	return abs(atan2((a*b.conjugate()).imag, (a*b.conjugate()).real))
p=map(lambda x:x[0]+1j*x[1],[map(float,raw_input().split()) for s in range(3)])
R=abs(p[1]-p[0])*abs(p[2]-p[1])*abs(p[2]-p[0])/abs(((p[1]-p[0])*((p[2]-p[0]).conjugate())).imag)/2
N=1/reduce(gcd,[alpha(p[(i+1)%3]-p[i],p[(i+2)%3]-p[i])/pi for i in range(3)])
print '%.9f'%(R**2*N*1./2*sin(2*pi/N))

#!/usr/bin/env python3

from math import sin, cos, pi, sqrt

# Number of given points
NUMPOINTS = 3

# Maximum amount of sides of the polygon
MAXSIDES = 100

# Point comparison precision (decimal signs)
PRECISION = 4

# Enable debug logging
DEBUG = False

# Отладочный вывод
def log(arg, highlight=False):
    if not DEBUG:
        return

    if highlight:
        print('\033[4m' + str(arg) + '\033[0m')
    else:
        print(arg)

# Список известных точек (колышков)
p = []

# Point comparison error
epsilon = 10 ** (-1 * PRECISION)
log('Error: {}'.format(epsilon))

# Input all points
log('Source points', True)

for i in range(NUMPOINTS):
    s = [float(n) for n in input().strip().split()]
    p.append((s[0], s[1]))

log(p)

# Нельзя допустить нулевой знаменатель при дальнейших расчётах
log('Permuted points', True)

if p[1][0] == p[0][0]:
    tmp = p[2]
    p[2] = p[1]
    p[1] = tmp

if p[2][0] == p[1][0]:
    tmp = p[2]
    p[2] = p[0]
    p[0] = tmp

log(p)

# Line slope coefficient
log('Line slope coefficients', True)

ma = (p[1][1] - p[0][1]) / (p[1][0] - p[0][0])
mb = (p[2][1] - p[1][1]) / (p[2][0] - p[1][0])

log('ma = {}, mb = {}'.format(ma, mb))

# Circumcircle center
log('Circumcircle center', True)

x = (ma * mb * (p[0][1] - p[2][1]) + mb * (p[0][0] + p[1][0]) - ma * (p[1][0] + p[2][0])) / (2 * (mb - ma))
y = -1 * (x - (p[0][0] + p[1][0]) / 2) / ma + (p[0][1] + p[1][1]) / 2

log('x = {}, y = {}'.format(x, y))

# Offset all points so that circumcircle's center is at (0; 0)
log('Point offset', True)

tmp, p = p, []

for point in tmp:
    p.append((point[0] - x, point[1] - y))

log(p)

# Checl every polygon for matching points
for n in range(3, MAXSIDES + 1):
    log('Number of sides: {}'.format(n), True)

    matched = 1

    d = 2 * pi / n
    sind = sin(d)
    cosd = cos(d)

    log('d = {}, sind = {}, cosd = {}'.format(d, sind, cosd))

    pd = p[0]

    for i in range(1, n):
        pd = (pd[0] * cosd - pd[1] * sind, pd[0] * sind + pd[1] * cosd)

        log('i = {}, p = {}'.format(i, pd))

        for point in p[1:]:
            delta = sqrt((point[0] - pd[0]) ** 2 + (point[1] - pd[1]) ** 2)

            log('\tpoint = {}, delta = {}'.format(point, delta))

            if delta < epsilon:
                matched += 1

    if matched == NUMPOINTS:
        break

# Радиус описанной окружности
radius = sqrt(p[0][0] ** 2 + p[0][1] ** 2)

# Площадь n-стороннего многоугольника с радиусом выше
area = n * (radius ** 2) * sind / 2

print(area)

from math import acos, sin, sqrt, pi
from decimal import Decimal
Ax,Ay=map(float,raw_input().split())
Bx,By=map(float,raw_input().split())
Cx,Cy=map(float,raw_input().split())
a_2=(Bx-Cx)**2+(By-Cy)**2;   a=sqrt(a_2)
b_2=(Ax-Cx)**2+(Ay-Cy)**2;   b=sqrt(b_2)
c_2=(Bx-Ax)**2+(By-Ay)**2;   c=sqrt(c_2)

P=(a+b+c)/2
S=sqrt(P*(P-a)*(P-b)*(P-c))
R=a*b*c/(4*S)
R_2=a_2*b_2*c_2/((a+b+c)*(b+c-a)*(a+b-c)*(a+c-b))

li = [float(x) for x in range(1,101)]

# print b_2
# mm=1-b_2/(2*R_2)
# mmm = Decimal(str(mm))
# print mm
# print mmm
# print acos(-1.0)
# print round(acos(mmm)/(2*pi/4) , 3)
for i in range(3,101):
    d1 = Decimal(str(1-c_2/(2*R_2)))
    d2 = Decimal(str(1-a_2/(2*R_2)))
    d3 = Decimal(str(1-b_2/(2*R_2)))

    if round(acos(d1)/(2*pi/i) , 3) in li \
    and round(acos(d2)/(2*pi/i) , 3) in li\
    and round(acos(d3)/(2*pi/i) , 3) in li :
        break

Sres=i*R_2*sin(2*pi/i)/2
print '%.6f' % Sres

import math

def vec( u, v ):
	return [u[i]-v[i] for i in range(len(u))]

def dis( u ):
	return math.sqrt(u[0]**2+u[1]**2)

def cross( u, v ):
	return (u[0]*v[1]-v[0]*u[1])

def dot( u, v ):
	return (u[0]*v[0]+u[1]*v[1])

def eq( a, b, eps=1e-3 ):
	return math.fabs(a-b) < eps

def gcd( a, b ):
	while not eq(b,0): t = b; b = a%b; a = t
	return a

p = [[float(v) for v in input().split()] for _ in range(3)]

a = dis(vec(p[0],p[1]))
b = dis(vec(p[1],p[2]))
c = dis(vec(p[2],p[0]))
S = math.fabs(0.5*cross(vec(p[1],p[0]),vec(p[2],p[0])))
R = a*b*c/(4*S)

A = math.acos((R**2-0.5*a**2)/R**2)
B = math.acos((R**2-0.5*b**2)/R**2)
C = math.acos((R**2-0.5*c**2)/R**2)

minAng = gcd(2*math.pi, gcd(A,gcd(B,C)))
#print( A/math.pi*180, B/math.pi*180, C/math.pi*180)
#print( minAng/math.pi*180, R )
n = (math.pi/minAng)

print( '{:.6f}'.format(n*R*R*math.sin(minAng)) )

import math
from fractions import gcd
[(x0,y0),(x1,y1),(x2,y2)] = [raw_input().split() for _ in xrange(3)]
x0,y0 = float(x0),float(y0)
x1,y1 = float(x1),float(y1)
x2,y2 = float(x2),float(y2)

# first, solve for the center of the circle (p,q)
# to see how I did this, see this math.stackexchange post:
# https://math.stackexchange.com/questions/213658/get-the-equation-of-a-circle-when-given-3-points
a11,a12,a21,a22 = 2*(x0-x1), 2*(y0-y1), 2*(x0-x2), 2*(y0-y2)
b1,b2 = x0**2-x1**2+y0**2-y1**2, x0**2-x2**2+y0**2-y2**2
q = (a21*b1 - a11*b2)/(a21*a12 - a11*a22)
p = (b1 - a12*q)/a11
r2 = (x0 - p)**2 + (y0 - q)**2

# as described here:
# https://math.stackexchange.com/questions/1142644/regular-polygon-determined-by-three-vertices
# we can determine the smallest number of sides given the angles with the center
AB = ((x0 - p)*(x1 - p) + (y0 - q)*(y1 - q))/r2
BC = ((x2 - p)*(x1 - p) + (y2 - q)*(y1 - q))/r2
CA = ((x0 - p)*(x2 - p) + (y0 - q)*(y2 - q))/r2

AOB = 180*math.acos(AB)/math.pi
BOC = 180*math.acos(BC)/math.pi
COA = 180*math.acos(CA)/math.pi

n,c1,c2,c3 = 2,0,0,0
while c1 + c2 + c3 != 3 and n <= 100:
	n += 1
	a = 360.0/n
	s1,s2,s3 = AOB/a, BOC/a, COA/a
	c1 = int(math.fabs(round(s1) - s1) < 0.1)
	c2 = int(math.fabs(round(s2) - s2) < 0.1)
	c3 = int(math.fabs(round(s3) - s3) < 0.1)

print n*r2*math.sin(2*math.pi/n)/2

from math import sqrt, sin, acos, pi

dist_sq = lambda A, B: (A[0] - B[0])**2 + (A[1] - B[1])**2

def angle(R, A, B):
    c = dist_sq(A, B)
    a = dist_sq(R, B)
    b = dist_sq(R, A)
    cosine = (a + b - c)/sqrt(4 * a * b)
    return acos(cosine)

def circumcentre(A, B, C):
    a = dist_sq(B, C)
    b = dist_sq(A, C)
    c = dist_sq(A, B)
    bary = (
        a * (b + c - a),
        b * (c + a - b),
        c * (a + b - c),
    )
    x = (bary[0] * A[0] + bary[1] * B[0] + bary[2] * C[0])/sum(bary)
    y = (bary[0] * A[1] + bary[1] * B[1] + bary[2] * C[1])/sum(bary)
    return (x, y)

def div(m, n):
    m, n = max(m, n), min(m, n)
    return abs(round(m/n) - m/n) < 10**-6

def gcd(a, b):
    a, b = max(a, b), min(a, b)
    if div(a, b):
        return b
    else:
        return gcd(b, a-b)

A = tuple(map(float, input().split()))
B = tuple(map(float, input().split()))
C = tuple(map(float, input().split()))
cir = circumcentre(A, B, C)
R = dist_sq(cir, A)

angles = [angle(cir, A, B), angle(cir, B, C), angle(cir, C, A)]
gamma = gcd(angles[0], angles[1])
print(pi * R * sin(gamma)/gamma)

import math
[(x0,y0),(x1,y1),(x2,y2)] = [raw_input().split() for _ in xrange(3)]
x0,y0 = float(x0),float(y0)
x1,y1 = float(x1),float(y1)
x2,y2 = float(x2),float(y2)

# first, solve for the center of the circle (p,q)
# to see how I did this, see this math.stackexchange post:
# https://math.stackexchange.com/questions/213658/get-the-equation-of-a-circle-when-given-3-points
a11,a12,a21,a22 = 2*(x0-x1), 2*(y0-y1), 2*(x0-x2), 2*(y0-y2)
b1,b2 = x0**2-x1**2+y0**2-y1**2, x0**2-x2**2+y0**2-y2**2
q = (a21*b1 - a11*b2)/(a21*a12 - a11*a22)
p = (b1 - a12*q)/a11

# as described here:
# https://math.stackexchange.com/questions/1142644/regular-polygon-determined-by-three-vertices
# we can determine the smallest number of sides given the angles with the center
AB = ((x0 - p)*(x1 - p) + (y0 - q)*(y1 - q))/math.sqrt(((x0 - p)**2 + (y0 - q)**2)*((x1 - p)**2 + (y1 - q)**2))
BC = ((x2 - p)*(x1 - p) + (y2 - q)*(y1 - q))/math.sqrt(((x2 - p)**2 + (y2 - q)**2)*((x1 - p)**2 + (y1 - q)**2))
CA = ((x0 - p)*(x2 - p) + (y0 - q)*(y2 - q))/math.sqrt(((x0 - p)**2 + (y0 - q)**2)*((x2 - p)**2 + (y2 - q)**2))

AOB = int(round(180*math.acos(AB)/math.pi))
BOC = int(round(180*math.acos(BC)/math.pi))
COA = int(round(180*math.acos(CA)/math.pi))

(r1,r2,r3) = (AOB/360.0,BOC/360.0,COA/360.0)

# brute forcing a bit here... might be too slow
n = 2
c1,c2,c3 = 0,0,0
while c1 + c2 + c3 != 3 and n <= 100:
	c1,c2,c3 = 0,0,0
	n += 1
	if n*r1 == math.floor(n*r1):
		c1 = 1
	if n*r2 == math.floor(n*r2):
		c2 = 1
	if n*r3 == math.floor(n*r3):
		c3 = 1

print n

from decimal import Decimal
from math import atan2, pi, sin

EPS = Decimal(1e-9)
pi = Decimal(pi)

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

    def __neg__(self):
        return Vector(-self.x, -self.y)

    def __xor__(self, v2):
        return Decimal(abs(atan2(self | v2, self & v2)))

    def __and__(self, v2):
        return self.x * v2.x + self.y * v2.y

    def __or__(self, v2):
        return self.x * v2.y - self.y * v2.x

p = [list(map(Decimal, input().split())) for x in range(3)]
ca, ab, bc = [Vector(p[i][0] - p[i - 1][0], p[i][1] - p[i - 1][1]) for i in range(3)]
angles = [-ca ^ ab, -ab ^ bc, -bc ^ ca]
R_sq = (ab.x ** Decimal(2) + ab.y ** Decimal(2)) / Decimal(sin(angles[2])) ** Decimal(2) / Decimal(4)
n = Decimal(3)
# print(*(180 * angle / pi for angle in angles))
while n < 101 and any(k for k in (angle * n / pi for angle in angles) if abs(k - int(k + EPS)) >= EPS):
    # print(n, *(k for k in ((pi - angle) * n / Decimal(2) / pi for angle in angles)))
    n += 1
print(n * R_sq * Decimal(sin(Decimal(2) * pi / n)) / Decimal(2))

from math import pi, fmod, fabs, hypot, atan2, sin

pi2 = 2.0 * pi
min_angle = pi2 / 100.0

def nod(n, m):
    if n < min_angle / 2.0:
        modulo = fmod((pi2 / m + min_angle / 4.0), 1.0)
        if modulo > min_angle / 2.0:
            m /= modulo
        return m
    else:
        return nod(fmod(m, n), n)

x1, y1 = map(float, raw_input().split())
x2, y2 = map(float, raw_input().split())
x3, y3 = map(float, raw_input().split())

# Find normals at centers of [(x1, y1)-(x2, y2)] and [(x2, y2)-(x3, y3)]
if y1 - y2 != 0.0:
    an12 = (x2 - x1) / (y1 - y2)
    bn12 = (y1 + y2) / 2.0 - an12 * (x1 + x2) / 2.0
else:
    an12 = None
    bn12 = (x1 + x2) / 2.0
if y2 - y3 != 0.0:
    an23 = (x3 - x2) / (y2 - y3)
    bn23 = (y2 + y3) / 2.0 - an23 * (x2 + x3) / 2.0
else:
    an23 = None
    bn23 = (x2 + x3) / 2.0

# Intersection of normals is circle center.
if an12 is not None and an23 is not None:
    x0 = (bn23 - bn12) / (an12 - an23)
    y0 = an12 * x0 + bn12
elif an12 is None:
    x0 = bn12
    y0 = an23 * x0 + bn23
else:
    x0 = bn23
    y0 = an12 * x0 + bn12

# Relocate center to (0, 0)
x1 -= x0
y1 -= y0
x2 -= x0
y2 -= y0
x3 -= x0
y3 -= y0

# Find radius
#r = hypot(x2, y2)
r2 = x2 * x2 + y2 * y2

# Calculate angles
angle1 = atan2(y1, x1)
angle2 = atan2(y2, x2)
angle3 = atan2(y3, x3)

angle12 = fabs(angle1 - angle2)
angle23 = fabs(angle2 - angle3)
angle13 = fabs(angle1 - angle3)

# Find angle between radiuses to nearby vertices
side_angle = nod(*sorted((nod(*sorted((angle12, angle23))), angle13)))

# Find n of our n-gon
n = pi2 / side_angle

# Finally calculate n-gon area
s = n * r2 * sin(side_angle) / 2.0

print "{0:.8f}".format(s)

import math

x1, y1 = map(float, input().split())
x2, y2 = map(float, input().split())
x3, y3 = map(float, input().split())

c1 = (x2 ** 2 - x1 ** 2 + y2 ** 2 - y1 ** 2) / 2
c2 = (x3 ** 2 - x2 ** 2 + y3 ** 2 - y2 ** 2) / 2
# dist x1-x2
r1 = (c1 * (y3 - y2) - c2 * (y2 - y1)) / ((x2 - x1) * (y3 - y2) - (x3 - x2) * (y2 - y1))
# dist x1-x3
r2 = (c1 * (x3 - x2) - c2 * (x2 - x1)) / ((y2 - y1) * (x3 - x2) - (y3 - y2) * (x2 - x1))
# ipotenuza
r = ((r1 - x1) ** 2 + (r2 - y1) ** 2) ** 0.5

foobar = 0
for i in range(3, 101):
    foo = False
    bar = False
    for ii in range(1, i):
        x4 = (x1 - r1) * math.cos(2 * math.pi * ii / i) - math.sin(2 * math.pi * ii / i) * (y1 - r2) + r1
        y4 = (y1 - r2) * math.cos(2 * math.pi * ii / i) + math.sin(2 * math.pi * ii / i) * (x1 - r1) + r2
        # if i pillars yields a 'full circle'/regular polyogn; print ans
        if (x4 - x2) ** 2 + (y4 - y2) ** 2 < 0.00001:
            foo = True
            foobar = i
            break
        if (x4 - x3) ** 2 + (y4 - y3) ** 2 < 0.00001:
            bar = True
            foobar = i
            break
# formula for area of equiangular polygon
print(foobar * r ** 2 * math.sin(2 * math.pi / foobar) / 2)

from math import acos, sin, sqrt, pi

Ax,Ay=map(float,raw_input().split())
Bx,By=map(float,raw_input().split())
Cx,Cy=map(float,raw_input().split())
a_2=(Bx-Cx)**2+(By-Cy)**2;   a=sqrt(a_2)
b_2=(Ax-Cx)**2+(Ay-Cy)**2;   b=sqrt(b_2)
c_2=(Bx-Ax)**2+(By-Ay)**2;   c=sqrt(c_2)

P=(a+b+c)/2
S=sqrt(P*(P-a)*(P-b)*(P-c))
R=a*b*c/(4*S)
R_2=a_2*b_2*c_2/((a+b+c)*(b+c-a)*(a+b-c)*(a+c-b))

li = [float(x) for x in range(1,101)]

for i in range(3,101):
    if round(acos(1-c_2/(2*R_2))/(2*pi/i) , 3) in li \
    and round(acos(1-a_2/(2*R_2))/(2*pi/i) , 3) in li\
    and round(acos(1-b_2/(2*R_2))/(2*pi/i) , 3) in li :
        break

print i
Sres=i*R_2*sin(2*pi/i)/2
print Sres

from math import pi, fabs, hypot, atan2, sin

pi2 = 2.0 * pi
eps = 0.000001

x1, y1 = map(float, raw_input().split())
x2, y2 = map(float, raw_input().split())
x3, y3 = map(float, raw_input().split())

# Find normals at centers of [(x1, y1)-(x2, y2)] and [(x2, y2)-(x3, y3)]
if y1 - y2 != 0.0:
    an12 = (x2 - x1) / (y1 - y2)
    bn12 = (y1 + y2) / 2.0 - an12 * (x1 + x2) / 2.0
else:
    an12 = None
    bn12 = (x1 + x2) / 2.0
if y2 - y3 != 0.0:
    an23 = (x3 - x2) / (y2 - y3)
    bn23 = (y2 + y3) / 2.0 - an23 * (x2 + x3) / 2.0
else:
    an23 = None
    bn23 = (x2 + x3) / 2.0

# Intersection of normals is circle center.
if an12 is not None and an23 is not None:
    x0 = (bn23 - bn12) / (an12 - an23)
    y0 = an12 * x0 + bn12
elif an12 is None:
    x0 = bn12
    y0 = an23 * x0 + bn23
else:
    x0 = bn23
    y0 = an12 * x0 + bn12

# Relocate center to (0, 0)
x1 -= x0
y1 -= y0
x2 -= x0
y2 -= y0
x3 -= x0
y3 -= y0

# Find radius
r = hypot(x2, y2)

# Calculate angles
angle1 = atan2(y1, x1)
angle2 = atan2(y2, x2)
angle3 = atan2(y3, x3)

angle12 = angle1 - angle2
angle23 = angle2 - angle3
angle13 = angle1 - angle3

# Find n of n-gon
n = 0
for n in range(3, 101):
    if fabs(sin(n * angle12 / 2.0)) < eps and\
       fabs(sin(n * angle23 / 2.0)) < eps and\
       fabs(sin(n * angle13 / 2.0)) < eps:
        break

# Finally calculate n-gon area
s = n * r * r * sin(pi2 / n) / 2.0

print "{0:.8f}".format(s)

#! /usr/bin/env python3
'''
' Title:	C. Ancient Berland Circus
' Author:	Cheng-Shih, Wong
' Date:		2016/04/01
'''

import math

def vec( u, v ):
	return [u[i]-v[i] for i in range(len(u))]

def dis( u ):
	return math.sqrt(u[0]**2+u[1]**2)

def cross( u, v ):
	return (u[0]*v[1]-v[0]*u[1])

def gcd( a, b ):
	while b!=0: t = b; b = a%b; a = t
	return a

p = [[float(v) for v in input().split()] for _ in range(3)]

a = dis(vec(p[0],p[1]))
b = dis(vec(p[1],p[2]))
c = dis(vec(p[2],p[0]))
S = 0.5*cross(vec(p[1],p[0]),vec(p[2],p[0]))
R = a*b*c/(4*S)

A = 2*abs(round(math.asin(a/(2*R))*180/math.pi))
B = 2*abs(round(math.asin(b/(2*R))*180/math.pi))
C = 2*abs(round(math.asin(c/(2*R))*180/math.pi))

minAng = gcd(A,gcd(B,C))
#print( A, B, C, minAng )

print( '{:.6f}'.format((180/minAng)*R*R*math.sin(minAng*math.pi/180)) )

from math import sqrt, acos, pi, sin

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

    def dot(self, other):
        return self.x * other.x + self.y * other.y

    def __add__(self, other):
        return Point(self.x + other.x, self.y + other.y)

    def __sub__(self, other):
        return Point(self.x - other.x, self.y - other.y)

    def __mul__(self, other):
        # Multiply by number
        return Point(self.x * other, self.y * other)

    def __str__(self):
        return "{%.2f, %.2f}" % (self.x, self.y, )

    def __abs__(self):
        return sqrt(self.x ** 2 + self.y ** 2)

class Line:
    '''
    Build line from coefficients A, B, C of its equation "Ax + By + C = 0"
    '''
    def __init__(self, a, b, c):
        self.a = a
        self.b = b
        self.c = c

    '''
    Build line from two points on it
    '''
    @staticmethod
    def from_points(p1, p2):
        a = p1.y - p2.y
        b = p2.x - p1.x

        return Line._from_vector_and_point((a, b, ), p1)

    '''
    Build line from direction vector and point on the line
    '''
    @staticmethod
    def _from_vector_and_point((vx, vy, ), p):
        return Line(vx, vy, - vx * p.x - vy * p.y)

    '''
    Returns vertor perpendicular to the given one (s.t. their dot product is zero)
    '''
    @staticmethod
    def _perp_vector(a, b):
        if b == 0:
            return 0.0, 1.0
        else:
            b_new = - 1.0 * a / b

            return 1.0, b_new

    '''
    Returns a line perpendicular to the current one that goes through point `p`
    '''
    def get_perp(self, p):
        a_new, b_new = self._perp_vector(self.a, self.b)

        return Line._from_vector_and_point((a_new, b_new, ), p)

    '''
    Returns the determinant of following matrix:
    [ `a00` `a01` ]
    [ `a10` `a11` ]
    '''
    @staticmethod
    def _det(a00, a01, a10, a11):
        return a00 * a11 - a01 * a10

    '''
    Returns the intersection point between the current line and `other`
    '''
    def intersect_with(self, other):
        delta = self._det(self.a, self.b, other.a, other.b)

        if delta == 0.0:
            raise Exception("ne peresekayutsia")

        x = - self._det(self.c, self.b, other.c, other.b) / delta
        y = - self._det(self.a, self.c, other.a, other.c) / delta

        return Point(x, y)

    def __str__(self):
        return "%.2fx + %.2fy + %.2f == 0" % (self.a, self.b, self.c, )

def midpoint(p1, p2):
    return (p1 + p2) * 0.5

# Returns radian measure of angle AOB, measured clockwise
def angle(a, o, b):
    oa = a - o
    ob = b - o

    cos_phi = 1.0 * oa.dot(ob) / abs(oa) / abs(ob)

    if cos_phi < -1.0:
        cos_phi = -1.0
    elif cos_phi > 1.0:
        cos_phi = 1.0

    phi = acos(cos_phi)

    if oa.y * ob.x - oa.x * ob.y < 0: # `ob` is counterclockwise to `oa`
        return 2.0 * pi - phi
    else:
        return phi

# Returns where it is possible for a `num-sides`-sided regular polygon to have some vertices at angles `alpha` and
# `beta` between each other
def regular_polygon_possible(num_vertices, alpha, beta):
    if alpha > beta:
        alpha, beta = beta, alpha

    enc = 0

    for i in xrange(1, num_vertices):
        for phi in (alpha, beta, ):
            if abs(phi - i * 2.0 * pi / num_vertices) < 2.0 * pi / 1750:
                enc += 1

    return enc == 2

def regular_polygon_area(r_big, num_vertices):
    return num_vertices / 2.0 * r_big ** 2 * sin(2.0 * pi / num_vertices)

ps = []

for i in [1, 2, 3]:
    x, y = map(float, raw_input().split(' '))

    ps.append(Point(x, y))

l1 = Line.from_points(ps[0], ps[1])
l2 = Line.from_points(ps[1], ps[2])

m1 = midpoint(ps[0], ps[1])
m2 = midpoint(ps[1], ps[2])

center = l1.get_perp(m1).intersect_with(l2.get_perp(m2))

alpha = angle(ps[0], center, ps[1])
beta =  angle(ps[0], center, ps[2])

num_vertices = None

for i in xrange(3, 100 + 1):
    if regular_polygon_possible(i, alpha, beta):
        num_vertices = i
        break

# print center

# print num_vertices

# print abs(ps[0] - center)

print regular_polygon_area(abs(ps[0] - center), num_vertices)

#  -coding: utf-8 -*-
import math
class Solution():
    def ancientBerlandCircus(self,x1,y1,x2,y2,x3,y3):
        d1 = math.sqrt(pow(x1-x2,2)+pow(y1-y2,2))
        d2 = math.sqrt(pow(x1-x3,2)+pow(y1-y3,2))
        d3 = math.sqrt(pow(x2-x3,2)+pow(y2-y3,2))
        p = (d1+d2+d3)/2
        s = math.sqrt(p*(p-d1)*(p-d2)*(p-d3))
        r = d1*d2*d3/4/s
        fal1 = math.acos(1-d1*d1/(2*r*r))
        fal3 = math.acos(1-d3*d3/(2*r*r))
        fal2 = 2*math.pi-fal1-fal3
        angle = self.fgcd(fal3,self.fgcd(fal1,fal2))
        mins = r*r/2*(2*math.pi/angle)*math.sin(angle)
        print '%.06f' % mins

    def fgcd(self,x,y):
        if x<1e-4:
            return y
        return self.fgcd(math.fmod(y,x),x)

x1,y1 = raw_input().split()
x2,y2 = raw_input().split()
x3,y3 = raw_input().split()
x1 = round(float(x1), 6)
y1 = round(float(y1), 6)
x2 = round(float(x2), 6)
y2 = round(float(y2), 6)
x3 = round(float(x3), 6)
y3 = round(float(y3), 6)
s = Solution()
s.ancientBerlandCircus(x1,y1,x2,y2,x3,y3)

from math import *
p = [list(map(float, input().split())) for i in range(3)]
a, b, c = [hypot((x1-x2), (y1-y2)) for (x1,y1), (x2,y2) in [(p[0], p[1]), (p[1], p[2]), (p[0], p[2])]]
A, B, C = [acos((x*x+y*y-z*z)/2/x/y) for x,y,z in [(c,b,a), (a,c,b), (a,c,b)]]
R = a / sin(A) / 2
def maxCommonDiv(m,n):
	if m < n:
		m, n = n, m
	if fmod(m, n) < 1e-3:
		return n
	else:
		return maxCommonDiv(fmod(m, n), n)

u = 2 * maxCommonDiv(A, maxCommonDiv(B, C))
print(round(R * R * pi / u * sin(u), 7))

from decimal import Decimal
from math import atan2, pi, sin

EPS = Decimal(1e-7)
pi = Decimal(pi)

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

    def __neg__(self):
        return Vector(-self.x, -self.y)

    def __xor__(self, v2):
        return Decimal(abs(atan2(self | v2, self & v2)))

    def __and__(self, v2):
        return self.x * v2.x + self.y * v2.y

    def __or__(self, v2):
        return self.x * v2.y - self.y * v2.x

p = [list(map(Decimal, input().split())) for x in range(3)]
ca, ab, bc = [Vector(p[i][0] - p[i - 1][0], p[i][1] - p[i - 1][1]) for i in range(3)]
angles = [-ca ^ ab, -ab ^ bc, -bc ^ ca]
R_sq = (ab.x ** Decimal(2) + ab.y ** Decimal(2)) / Decimal(sin(angles[2])) ** Decimal(2) / Decimal(4)
n = Decimal(3)
# print(*(180 * angle / pi for angle in angles))
while n < 101 and any(k for k in (angle * n / pi for angle in angles) if abs(k - int(k + EPS)) >= EPS):
    # print(n, *(k for k in ((pi - angle) * n / Decimal(2) / pi for angle in angles)))
    n += 1
print(n * R_sq * Decimal(sin(Decimal(2) * pi / n)) / Decimal(2))

import math
mass=[]
for i in range(3):
    a=raw_input()
    x=float(a.split()[0])
    y=float(a.split()[1])
    mass.append([x,y])
mass2=[]
b=0
for y in range(2):
    b=b+(mass[0][y]-mass[1][y])**2
mass2.append(b**0.5)
b=0
for y in range(2):
    b=b+(mass[1][y]-mass[2][y])**2
mass2.append(b**0.5)
b=0
for y in range(2):
    b=b+(mass[0][y]-mass[2][y])**2
mass2.append(b**0.5)
a=min(mass2)
mass_s=[]
mass_ABC=[]
h=((mass2[0])**2+(mass2[1])**2-(mass2[2])**2)/(2*(mass2[0])*(mass2[1]))
if -1<=h<=1:
    h=math.acos(h)*180/math.pi
    if (h-int(h)>0.5):
        h=int(h)+1
    else:
        h=int(h)
    mass_ABC.append(h)
h=((mass2[1])**2+(mass2[2])**2-(mass2[0])**2)/(2*(mass2[1])*(mass2[2]))
if -1<=h<=1:
    h=math.acos(h)*180/math.pi
    if (h-int(h)>0.5):
        h=int(h)+1
    else:
        h=int(h)
    mass_ABC.append(h)
h=((mass2[0])**2+(mass2[2])**2-(mass2[1])**2)/(2*(mass2[0])*(mass2[2]))
if -1<=h<=1:
    h=math.acos(h)*180/math.pi
    if (h-int(h)>0.5):
        h=int(h)+1
    else:
        h=int(h)
    mass_ABC.append(h)
    print(mass_ABC)
for i in range(len(mass_ABC)):
    if(180%mass_ABC[i]==0):
        for j in range(101):
            j+=1
            if j>2:
                if(j*mass_ABC[i]%(180+(j-3)*180)==0):
                    s=0
                    s=(j*(a**2))/(4*(math.tan(math.pi/j)))
                    print(mass_ABC[i],j,s)
                    mass_s.append(s)
print('%4.6f' % min(mass_s))

import math
import sys

def beta(x11, x12, y11, y12):
    t = (x11*x12 + y11*y12)/(math.hypot(x11, y11)*math.hypot(x12, y12))
    if math.fabs(t) > 1.0:
        t = round(t)

    return math.acos(t)

#sys.stdin = open('input.txt')

math.hypot = lambda x, y: math.sqrt(x*x + y*y)

EPS = 1e-03
PI = math.pi

x1, y1 = map(float, input().split())
x2, y2 = map(float, input().split())
x3, y3 = map(float, input().split())

l = math.hypot(x1 - x2, y1 - y2)*0.5

xm = min(x1, x2) + math.fabs(x1 - x2)*0.5
ym = min(y1, y2) + math.fabs(y1 - y2)*0.5

xp = y1 - y2
yp = x2 - x1
p = math.hypot(xp, yp)
last = 0

mark = False
i = 3
while i < 101:
    phi = 2.0*PI/float(i)
    j = i//2
    while j > 0:
        h = float(l)/math.tan(phi*float(j)*0.5)
        k = float(h)/float(p)

        x0_pos = xm - k*xp
        y0_pos = ym - k*yp
        x0_neg = xm + k*xp
        y0_neg = ym + k*yp
        r = math.hypot(x1 - x0_pos, y1 - y0_pos)

        c1 = math.fabs(math.hypot(x3 - x0_pos, y3 - y0_pos) - r) < EPS
        c2 = math.fabs(math.hypot(x3 - x0_neg, y3 - y0_neg) - r) < EPS
        if c1 or c2:
            if c1:
                x0, y0 = x0_pos, y0_pos
            else:
                x0, y0 = x0_neg, y0_neg

            #print(((x3 - x0)*(x2 - x0) + (y3 - y0)*(y2 - y0))/(math.hypot(x3 - x0, y3 - y0)*math.hypot(x2 - x0, y2 - y0)))
            b1 = beta(x3 - x0, y3 - y0, x1 - x0, y1 - y0)
            b2 = beta(x3 - x0, y3 - y0, x2 - x0, y2 - y0)
            b3 = beta(x1 - x0, y1 - y0, x2 - x0, y2 - y0)
            div = lambda b: math.fabs(b/phi - round(b/phi)) < EPS

            last = 0.5*float(r)*float(r)*math.sin(phi)*float(i)

            if div(b1) and div(b2) and div(b3):
                print(last)
                mark = True
                break

        j -= 1
    if mark:
        break

    i += 1

if not mark:
    print(last)
# I'm so dumb.....................

from math import *

def LineIntersect(a,b):
    det=lambda a,b,c,d:a*d-b*c
    z=det(a[0],a[1],b[0],b[1])
    return (-det(a[2],a[1],b[2],b[1])/z,-det(a[0],a[2],b[0],b[2])/z)

def GetCircleInOrigin(A):
    GetNormal=lambda (x,y):(-y,x)
    GetDif=lambda (x1,y1),(x2,y2):(x1-x2,y1-y2)
    GetSum=lambda (x1,y1),(x2,y2):(x1+x2,y1+y2)
    GetMultToCof=lambda (x1,y1),c:(x1*c,y1*c)
    NormalLine=lambda (a,b):(b[1]-a[1],a[0]-b[0],a[1]*b[0]-a[0]*b[1])
    L=[ (GetSum(GetMultToCof(GetDif(A[i+1],A[i]),0.5),A[i]),GetSum(GetSum(GetMultToCof(GetDif(A[i+1],A[i]),0.5),A[i]),GetNormal(GetDif(A[i+1],A[i])))) for i in range(2)]
    L=map(NormalLine,L)
    L=LineIntersect(L[0],L[1])
    return map(lambda x:GetDif(x,L),A)

def gcd(a,b):
    if (b<pi/1000):
        return a;
    else:
        return gcd(b,fmod(a,b))

A=[map(float,raw_input().split()) for i in range(3)]
A=GetCircleInOrigin(A)
C=[atan2(y,x) for x,y in A]
C=[C[i]-C[j] for (i,j) in [(0,1),(1,2),(2,0)]]
for i in range(3):
    if (C[i]<0):
        C[i]+=2*pi
R=hypot(*A[0])
omega=gcd(C[0],gcd(C[1],C[2]))
print R**2*pi/omega*sin(omega)

# @auther: guoyc
# @date: 2018/7/16

import math

p1 = [float(_) for _ in input().split()]
p2 = [float(_) for _ in input().split()]
p3 = [float(_) for _ in input().split()]

def get_angle(p1, p2, p3):
    v1 = (p2[0] - p1[0], p2[1] - p1[1])
    v2 = (p3[0] - p1[0], p3[1] - p1[1])

    dot_prod = v1[0] * v2[0] + v1[1] * v2[1]

    l1 = math.sqrt(v1[0] ** 2 + v1[1] ** 2)
    l2 = math.sqrt(v2[0] ** 2 + v2[1] ** 2)

    angle = math.acos(dot_prod / (l1 * l2))

    return angle, l1, l2

point = None
others = None
angle, l1, l2 = [None] * 3

import sys

res = sys.maxsize

if get_angle(p1, p2, p3)[0] >= math.pi / 3:
    angle, l1, l2 = get_angle(p1, p2, p3)
    n = int(2 * math.pi / (math.pi - angle))
    l = max(l1, l2)
    h = l * math.sin(math.pi / 2 - math.pi / n) * math.sin(math.pi / 2 - math.pi / n) / math.sin(2 * math.pi / n)
    res = min(res, l * h / 2 * n)

if get_angle(p2, p1, p3)[0] >= math.pi / 3:
    angle, l1, l2 = get_angle(p2, p1, p3)
    n = int(2 * math.pi / (math.pi - angle))
    l = max(l1, l2)
    h = l * math.sin(math.pi / 2 - math.pi / n) * math.sin(math.pi / 2 - math.pi / n) / math.sin(2 * math.pi / n)
    res = min(res, l * h / 2 * n)

if get_angle(p3, p1, p2)[0] >= math.pi / 3:
    angle, l1, l2 = get_angle(p3, p1, p2)
    n = int(2 * math.pi / (math.pi - angle))
    l = max(l1, l2)
    h = l * math.sin(math.pi / 2 - math.pi / n) * math.sin(math.pi / 2 - math.pi / n) / math.sin(2 * math.pi / n)
    res = min(res, l * h / 2 * n)

print(res)

#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Created on Tue Mar 10 20:19:16 2015
kristof.jakab@hegelab.org
"""

import math

class Point(object):
    """ """
    def __init__(self, x, y):
        self.x = x
        self.y = y
        self.vabs = round(math.sqrt(x ** 2 + y ** 2), 6)

class Line(object):
    """ """
    def __init__(self, A, B):
        self.direction = Point(B.x - A.x, B.y - A.y)
        self.length = math.sqrt((B.x - A.x) ** 2 + (B.y - A.y) ** 2)

def calculate_angle(point_A, point_B):
    ab = point_A.x * point_B.x + point_A.y * point_B.y
    cos_angle = ab / (point_A.vabs * point_B.vabs)
    # return round(math.degrees(math.acos(cos_angle)), 6)
    return round(math.acos(cos_angle), 6)

def calculate_area(n, R):
    area = 0.5 * n * R * R * math.sin(2 * math.pi / n)
    return round(area, 6)

A = Point(*map(float, raw_input().split()))
B = Point(*map(float, raw_input().split()))
C = Point(*map(float, raw_input().split()))

AB = Line(A, B)
AC = Line(A, C)

BA = Line(B, A)
BC = Line(B, C)

a = calculate_angle(AB.direction, AC.direction) * 2
b = calculate_angle(BA.direction, BC.direction) * 2

if a > math.pi:
    a = 2 * math.pi - a
if b > math.pi:
    b = 2 * math.pi - b

c = 2 * math.pi - (a + b)

# R = (BC.length / 2) / math.sin(math.radians(a / 2))
R = (BC.length / 2) / math.sin(a / 2)

for x in xrange(1, 100):
    y = x * (a / c)
    z = x * (b / c)
    if round(y, 1) % 1 == 0 and round(z, 1) % 1 == 0:
        n = int(round(x + y + z, 0))
        break

print calculate_area(n, R)

import sys
import math

eLim = 0.01

def getPoint():
    return tuple(float(_) for _ in input().split())

def calCenter(point1, point2, point3):
    x1, y1 = point1
    x2, y2 = point2
    x3, y3 = point3
    R1 = x2 ** 2 - x1 ** 2 + y2 ** 2 - y1 ** 2
    R2 = x3 ** 2 - x1 ** 2 + y3 ** 2 - y1 ** 2
    delX21 = x2 - x1
    delX31 = x3 - x1
    delY21 = y2 - y1
    delY31 = y3 - y1

    y = 1 / 2 * (delX31 * R1 - delX21 * R2) / (delX31 * delY21 - delX21 * delY31)
    x = 1 / 2 * (delY31 * R1 - delY21 * R2) / (delY31 * delX21 - delY21 * delX31)
    return (x, y)

def calAngle(point1, point2, point3):
    xVec = tuple((x - y for (x, y) in zip(point1, point2)))
    yVec = tuple((x - y for (x, y) in zip(point1, point3)))
    return math.degrees(math.acos(sum(x * y for x, y in zip(xVec, yVec)) / (sum(x ** 2 for x in xVec) ** 0.5 * sum(x ** 2 for x in yVec) ** 0.5)))

def calArea(n, r):
    return 0.5 * (r ** 2) * n * math.sin(2 * math.pi / n)

if __name__ == "__main__":
    #point1 = (0.000000, 0.000000)
    #point2 = (1.000000, 1.000000)
    #point3 = (0.000000, 1.000000)
    point1 = getPoint()
    point2 = getPoint()
    point3 = getPoint()
    O = calCenter(point1, point2, point3) # center O: (0.5, 0.5)
    R = sum((x - y) ** 2 for x, y in zip(O, point1)) ** 0.5
    A = calAngle(O, point1, point2)
    B = calAngle(O, point2, point3)
    C = calAngle(O, point3, point1)
    #print(A, B, C)
    minAngle = min(A, B, C)
    index = 1
    while True:
        alpha = minAngle / index
        if sum(_ / alpha for _ in (A, B, C)) > 100:
            #print("Not found!")
            sys.exit(1)
        delta =  tuple((_ / alpha - _ // alpha for _ in (A, B, C)))
        #print(delta)
        isFound = True
        for _ in delta:
            if _ > eLim and 1 - _ > eLim:
                isFound = False
                break
        if isFound:
            #print(alpha)
            break
        else:
            index += 1
    n = sum(_ / alpha for _ in (A, B, C)) + eLim
    n = int(n)
    #print("{0:.6f}".format(calArea(n, R)))
    print(calArea(n, R))

from math import pi,sin,cos,acos,sqrt,hypot,ceil,floor
xa,ya = map(float,raw_input().split())
xb,yb = map(float,raw_input().split())
xc,yc = map(float,raw_input().split())
x0 = ((ya-yc)*(xa*xa+ya*ya-xb*xb-yb*yb)-(ya-yb)*(xa*xa+ya*ya-xc*xc-yc*yc))/2.0/((xa-xb)*(ya-yc)-(xa-xc)*(ya-yb))
y0 = (xa*xa+ya*ya-xb*xb-yb*yb - 2.0*x0*(xa-xb))/2.0/(ya-yb)
xa -= x0
ya -= y0
xb -= x0
yb -= y0
xc -= x0
yc -= y0
a1 = acos((xa*xb+ya*yb)/hypot(xa,ya)/hypot(xb,yb))
a2 = acos((xb*xc+yb*yc)/hypot(xb,yb)/hypot(xc,yc))
for i in range(3,100):
    a = 2.0*pi/i
    k1 = a1/a
    k2 = a2/a
    if (abs(ceil(k1)-k1) < 0.001 or abs(floor(k1)-k1) < 0.001) and (abs(ceil(k2)-k2) < 0.001 or abs(floor(k2)-k2) < 0.001):
        print i*(xa*xa+ya*ya)*sin(pi/i)*cos(pi/i)
        exit()

import math
Ax,Ay = input().split()
Bx,By = input().split()
Cx,Cy = input().split()
AB = math.sqrt((float(Ax)-float(Bx))**2+(float(Ay)-float(By))**2)
BC = math.sqrt((float(Cx)-float(Bx))**2+(float(Cy)-float(By))**2)
CA = math.sqrt((float(Ax)-float(Cx))**2+(float(Ay)-float(Cy))**2)
A= math.acos((AB**2+CA**2-BC**2)/(2*AB*CA))
B= math.acos((BC**2+AB**2-CA**2)/(2*AB*BC))
C= math.acos((BC**2+CA**2-AB**2)/(2*BC*CA))
Sx=(float(Ax)*math.sin(2*A)+float(Bx)*math.sin(2*B)+float(Cx)*math.sin(2*C))/(math.sin(2*A)+math.sin(2*B)+math.sin(2*C))
Sy=(float(Ay)*math.sin(2*A)+float(By)*math.sin(2*B)+float(Cy)*math.sin(2*C))/(math.sin(2*A)+math.sin(2*B)+math.sin(2*C))
R= math.sqrt((float(Ax)-Sx)**2+(float(Ay)-Sy)**2)
for x in range(4,101):
    if(math.fabs(R*(2*math.sin(math.pi/x))-round(R*(2*math.sin(math.pi/x))))<.05):
        print('{:.6f}'.format(.5*x*R*R*math.sin(2*math.pi/x)))
        break

from math import *

def gcd(x,y):
    if y < 1e-3:
        return x
    else:
        return gcd(y,fmod(x,y))

def area(a, b, c):
    s = (a + b + c) / 2
    return sqrt(s*(s-a)*(s-b)*(s-c))

point = [list(map(float,input().split())) for i in range(3)]

a,b,c = [sqrt((x1-x2)*(x1-x2)+(y1-y2)*(y1-y2)) for (x1,y1),(x2,y2) in
         [(point[0],point[1]),(point[0],point[2]), (point[1],point[2])]]
A,B,C = [acos((y*y+z*z-x*x)/2/z/y) for x,y,z in [(a,b,c),(b,c,a),(c,a,b)]]

S = area(a, b, c)
R = a * b * c / 4 * S
gcd_ = gcd(A, gcd(B, C))
n = pi / gcd_
print(round(R*R*n*sin((2*pi)/n))/2,7)

from math import *
p = [list(map(float, input().split())) for i in range(3)]
a, b, c = [hypot((x1-x2), (y1-y2)) for (x1,y1), (x2,y2) in [(p[0], p[1]), (p[1], p[2]), (p[0], p[2])]]
A, B, C = [acos((x*x+y*y-z*z)/2/x/y) for x,y,z in [(c,b,a), (a,c,b), (a,c,b)]]
R = a / sin(A) / 2
def maxCommonDiv(m,n):
	if m < n:
		m,n = n,m
	if n < 1e-3:
		return m
	else:
		return maxCommonDiv(n, fmod(m, n))

u = 2 * maxCommonDiv(2 * pi, maxCommonDiv(A, maxCommonDiv(B, C)))
print(round(R * R * pi / u * sin(u), 7))

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

def area(d):
    if len(d) < 3:
        return False
    a = 0.0
    p = 0.5 * (d[0] + d[1] + d[2])
    a = math.sqrt(p*(p-d[0])*(p-d[1])*(p-d[2]))
    return a

def circumcircle(x,y):
    distance = euclidean(x,y)
    triangle_area = area(distance)
    return distance[0] * distance[1] * distance[2] / (4 * triangle_area)

def euclidean(x,y):
    d = []
    d.append(math.sqrt((x[0]-x[1])**2 + (y[0]-y[1])**2))
    d.append(math.sqrt((x[0]-x[2])**2 + (y[0]-y[2])**2))
    d.append(math.sqrt((x[1]-x[2])**2 + (y[1]-y[2])**2))
    return d

def centerAngle(d,radius):
    angle = []
    #print(type(d[0]), type(radius))
    #print(d[0]/(2*radius))
    #print(2 * math.asin( d[0] / (2*radius) ) )
    angle.append(2*math.asin(d[0]/(2*radius)))
    angle.append(2*math.asin(d[1]/(2*radius)))
    angle.append(math.pi - angle[0]- angle[1])
    return angle

def gcd(a,b):
    if a < 0.01:
        return b
    else:
        return gcd(math.fmod(b,a),a)
def main():

    # get the input data
    x = []
    y = []
    for i in range(3):
        temp_input = input().split()
        x.append(float(temp_input[0]))
        y.append(float(temp_input[1]))

    # 1. calculate the length of the edge
    # 2. calculate the area of the triangle
    # 3. calculate the radius of the circumcircle
    # 4. calculate the area of the Berland Circus

    edge_length = euclidean(x,y)

    triangle_area = area(edge_length)

    circumcircle_radius = circumcircle(x,y)

    #print("circumcircle_radius: {0[0]}:{1[0]},{0[1]}:{1[1]}, {0[2]}:{1[2]} \n {2}".format(x,y,circumcircle_radius))
    # 5. calculat the cetral angle and their gcd
    angle = centerAngle(edge_length, circumcircle_radius)

    gcd_angle = gcd(gcd(angle[0], angle[1]), angle[2])

    result = 2 * math.pi / gcd_angle * circumcircle_radius * math.sin(gcd_angle) * circumcircle_radius * 0.5

    #print("circumcircle_radius",circumcircle_radius)
    #print("totoal_angle",angle)
    #print("gcd_angle",gcd_angle)
    #print("len",edge_length)
    print("{:.7f}".format(result))

if __name__ == "__main__":
    main()

import math

def theatresquare(n,m,a):
    return ((n-1)//a + 1)*((m-1)//a + 1)

# n,m,a = list(map(int,input().split()))
# print(theatresquare(n,m,a))

def convert(x):
    s = ""
    while x > 0:
        a = x%26
        x = x//26
        if a == 0:
            a = 26
            x -= 1
        s = chr(a-1+ord('A')) + s
    return s

def convertindex(x):
    i = 0
    while (x[i] <= 'Z') and (x[i] >= 'A'):
        i += 1
    j = i
    while (j < len(x)) and (x[j] <= '9') and (x[j] >= '0'):
        j += 1
    if j == len(x):
        s = 0
        for j in range(i):
            s = (ord(x[j]) - ord('A')+1) + 26*s
        return 'R' + x[i:] + 'C' + str(s)
    else:
        while (x[i] <= '9') and (x[i] >= '0'):
            i += 1
        return convert(int(x[i+1:])) + x[1:i]

# cases = int(input())
# for _ in range(cases):
#     l = input()
#     print(convertindex(l))

def berlandcircus(A,B,C):
    a = (B[0] - C[0])**2 + (B[1] - C[1])**2
    b = (A[0] - C[0])**2 + (A[1] - C[1])**2
    c = (B[0] - A[0])**2 + (B[1] - A[1])**2

    la = math.acos(abs((b+c-a)/(2*math.sqrt(b)*math.sqrt(c))))/math.pi
    lb = math.acos(abs((c-b+a)/(2*math.sqrt(a)*math.sqrt(c))))/math.pi
    lc = math.acos(abs((b-c+a)/(2*math.sqrt(a)*math.sqrt(b))))/math.pi

    i = 3
    while i < 101:
        if la*i-round(la*i) < 0.000001:
            if lb*i-round(lb*i) < 0.000001:
                if lb*i-round(lb*i) < 0.000001:
                    return round(i*0.125*a*math.sin(2*math.pi/i)/math.sin(la*math.pi)**2,6)
        i += 1

A = list(map(float,input().split()))
B = list(map(float,input().split()))
C = list(map(float,input().split()))

print(berlandcircus(A,B,C))

"""
Codeforces
1C - Ancient Berland Circus
http://codeforces.com/problemset/problem/1/C

Héctor González Belver
11/06/2018
"""
import sys
import math

def float_gcd(a, b, rtol = 0, atol = 1e-05):
    t = min(abs(a), abs(b))
    while abs(b) > rtol * t + atol:
        a, b = b, a % b
    return a

def main():
  point_A = [float(x) for x in sys.stdin.readline().strip().split()]
  point_B = [float(x) for x in sys.stdin.readline().strip().split()]
  point_C = [float(x) for x in sys.stdin.readline().strip().split()]

  #Triangle
  side_a = math.hypot(point_B[0] - point_C[0], point_B[1] - point_C[1])
  side_b = math.hypot(point_A[0] - point_C[0], point_A[1] - point_C[1])
  side_c = math.hypot(point_A[0] - point_B[0], point_A[1] - point_B[1])

  #Semiperimeter of the triangle
  semiperimeter_T = (side_a + side_b + side_c)/2

  #Area of triangle: Heron's formula
  area_T = (semiperimeter_T*(semiperimeter_T - side_a)*(semiperimeter_T - side_b)*(semiperimeter_T - side_c))**0.5

  #Angles of triangle: Law of cosines
  angle_A = math.acos((side_b**2 + side_c**2 - side_a**2)/(2*side_b*side_c))
  angle_B = math.acos((side_a**2 + side_c**2 - side_b**2)/(2*side_a*side_c))
  angle_C = math.acos((side_a**2 + side_b**2 - side_c**2)/(2*side_a*side_b))

  #Circumradius (R) of the triangle = circumradius of possible convex regular n-gons
  R = (side_a*side_b*side_c)/(4*area_T)

  #Angles of the triangle are inscribed angles of circumcircle with center O --> inscribed angles theorem: relates the measure of an inscribed angle to that of the central angle subtending the same arc
  #-->angle_BOC = 2*angle_A
  #-->angle_AOC = 2*angle_B
  #-->angle_AOB = 2*angle_C

  #Central angle of convex regular n-gon = 2*pi/n
  #--> angle_BOC = i * 2*pi/n ==> angle_A = i * pi/n
  #--> angle_AOC = j * 2*pi/n ==> angle_B = j * pi/n
  #--> angle_AOB = k * 2*pi/n ==> angle_C = k * pi/n
  #i + j + k = n ( i,j,k,n positive integers)
  #==>mimimum area==>minimum n==> gcd(angle_A, angle_B, angle_C) = pi/n
  #==>n=pi/gcd(angle_A, angle_B, angle_C)
  n = math.pi/float_gcd(float_gcd(angle_A, angle_B), angle_C)
  print(n)

  #Area of convex regular n-gons by circumradius
  A = (math.sin(2*math.pi/n)*n*R**2)/2

  sys.stdout.write("{:.6f}".format(A)+"\n")

if __name__ == '__main__':
  main()

import math

array, newarray = [], [0]*3

for x in range(3):
  n = input().split()
  m = list(map(float, n))
  array.append(m)

def magn_sq(point):
  return (point[0]**2 + point[1]**2)

def dist_sq(point1, point2):
  return magn_sq([point1[0] - point2[0], point1[1] - point2[1]])

def circumcenter(point1, point2, point3):
  point_1 = [point1[0] - point3[0], point1[1] - point3[1]]
  point_2 = [point2[0] - point3[0], point2[1] - point3[1]]
  const = 2*(point_1[0]*point_2[1] - point_1[1]*point_2[0])
  xcoord = (point_2[1]*magn_sq(point_1) - point_1[1]*(magn_sq(point_2)))/const
  ycoord = (point_1[0]*magn_sq(point_2) - point_2[0]*(magn_sq(point_1)))/const
  return [xcoord + point3[0], ycoord + point3[1]]

center = circumcenter(array[0], array[1], array[2])
center = list(map(lambda x: round(x, 1), center))

for x in array:
  x[0] = x[0] - center[0]
  x[1] = x[1] - center[1]

radius = math.sqrt(magn_sq(array[0]))

for x in range(3):
  newarray[x] = math.sqrt(dist_sq(array[x], array[(x+1)%3]))

def distToAngle(p):
  return (math.asin(p/(2*radius)))/math.pi

newarray = list(map(distToAngle, newarray))

def gcf(a,b):
  if a >= b:
    if a - b < 0.0001:
      return a
    else:
      return gcf(a-b, b)
  else:
    return gcf(b, a)

gcd = 1/gcf(gcf(newarray[0], newarray[1]), newarray[2])

def checkInt(a):
  r = int(round(a,0))
  return abs(r - a) < 0.001

i = 1
while (not checkInt(i*gcd)):
  i += 1

t = i*gcd

numsides = int(round(t,0))

area = 0.5*numsides*(radius**2)*math.sin(2*math.pi/numsides)

print(area)

from math import *

def LineIntersect(a,b):
    det=lambda a,b,c,d:a*d-b*c
    z=det(a[0],a[1],b[0],b[1])
    return (-det(a[2],a[1],b[2],b[1])/z,-det(a[0],a[2],b[0],b[2])/z)

def GetCircleInOrigin(A):
    GetNormal=lambda (x,y):(-y,x)
    GetDif=lambda (x1,y1),(x2,y2):(x1-x2,y1-y2)
    GetSum=lambda (x1,y1),(x2,y2):(x1+x2,y1+y2)
    GetMultToCof=lambda (x1,y1),c:(x1*c,y1*c)
    NormalLine=lambda (a,b):(b[1]-a[1],a[0]-b[0],a[1]*b[0]-a[0]*b[1])
    L=[ (GetSum(GetMultToCof(GetDif(A[i+1],A[i]),0.5),A[i]),GetSum(GetSum(GetMultToCof(GetDif(A[i+1],A[i]),0.5),A[i]),GetNormal(GetDif(A[i+1],A[i])))) for i in range(2)]
    L=map(NormalLine,L)
    L=LineIntersect(L[0],L[1])
    return map(lambda x:GetDif(x,L),A)

def gcd(a,b):
    if (b<0.0000000001):
        return a;
    else:
        return gcd(b,fmod(a,b))

A=[map(float,raw_input().split()) for i in range(3)]
A=GetCircleInOrigin(A)
C=[atan2(y,x) for x,y in A]
C=[C[i]-C[j] for (i,j) in [(0,1),(1,2),(2,0)]]
for i in range(3):
    if (C[i]<0):
        C[i]+=2*pi
R=hypot(*A[0])
omega=gcd(C[0],gcd(C[1],C[2]))
print ((2*pi)/omega)*((R**2)*sin(omega))/2.0

import math

eps = 0.000001

def gcd(a, b):
    while (math.fabs(a) > eps and math.fabs(b) > eps):
        if (a > b):
            a -= math.floor(a/b) * b
        else:
            b -= math.floor(b/a) * a
    return a + b

a = raw_input().split(' ')
b = raw_input().split(' ')
c = raw_input().split(' ')

ax = float(a[0])
ay = float(a[1])
bx = float(b[0])
by = float(b[1])
cx = float(c[0])
cy = float(c[1])

ayd = by - ay
axd = bx - ax
byd = cy - by
bxd = cx - bx

aslope = 0
bslope = 0

if axd != 0:
    aslope = ayd / axd

if bxd != 0:
    bslope = byd / bxd

abmidx = (ax+bx)/2
abmidy = (ay+by)/2
bcmidx = (bx+cx)/2
bcmidy = (by+cy)/2

if ayd == 0:
    cex = abmidx
    if bxd == 0:
        cey = bcmidy
    else:
        cey = bcmidy + (bcmidx - cex)/bslope
elif byd == 0:
    cex = bcmidx
    if axd == 0:
        cey = abmidy
    else:
        cey = abmidy + (abmidx - cex)/aslope
elif axd == 0:
    cey = abmidy
    cex = bslope*(bcmidy - cey) + bcmidx
elif bxd == 0:
    cey = bcmidy
    cex = aslope*(abmidy - cey) + abmidx
else:
    cex = (aslope*bslope*(abmidy - bcmidy) - aslope*bcmidx + bslope*abmidx)/(bslope - aslope)
    cey = abmidy - (cex - abmidx)/aslope

r = math.sqrt((ax - cex)**2 + (ay - cey)**2)

ab = math.sqrt((ax-bx)**2 + (ay-by)**2)
ac = math.sqrt((ax-cx)**2 + (ay-cy)**2)
bc = math.sqrt((bx-cx)**2 + (by-cy)**2)

acex = ax - cex
acey = ay - cey
bcex = bx - cex
bcey = by - cey
ccex = cx - cex
ccey = cy - cey

alfa = math.acos((bc**2 + ac**2 - ab**2)/(2*bc*ac))
beta = math.acos((ab**2 + ac**2 - bc**2)/(2*ab*ac))
gamma = math.acos((ab**2 + bc**2 - ac**2)/(2*ab*bc))

n = math.pi / gcd(gcd(alfa, beta), gamma)

area = 0.5 * float(n) * r * r * math.sin(2 * math.pi / n)

print area

import math
A = input().split()
B = input().split()
C = input().split()

a1, a2 = float(A[0]), float(A[1])
b1, b2 = float(B[0]), float(B[1])
c1, c2 = float(C[0]), float(C[1])

a = ((b1-c1)**2 + (b2-c2)**2) **0.5
b = ((a1-c1)**2 + (a2-c2)**2) **0.5
c = ((b1-a1)**2 + (b2-a2)**2) **0.5

cosa = (b**2+c**2-a**2)/(2*b*c)
sina = (1-cosa**2)**0.5
R = a/(2*sina)
side = min(a,b,c)
s = (R+R+side)/2
tri_area = (s*(s-R)*(s-R)*(s-side))**0.5

#tri_area = 1/2*R*R*sinTheta
sinTheta = (tri_area*2)/(R**2)
theta = math.asin(sinTheta)
count = (2 * math.pi) / theta
total_area = round(count * tri_area, 6)

print(total_area)
#print(a)
#print(sina)
#print("R:", a/(2*sina))
#print("tri_area:", tri_area)
#print(theta)
#print(count)
#print(total_area)

##x1, y1 = map(float, raw_input().split())
##x2, y2 = map(float, raw_input().split())
##x3, y3 = map(float, raw_input().split())
import math
x1 = 0.0; y1 = 0.0
x2 = 0.0; y2 = 1.0
x3 = 1.0; y3 = 0.0
EPSILON = 0.0000001
def midPoint(x1, y1, x2, y2):
    mid_x = (x1 + x2) / 2
    mid_y = (y1 + y2) / 2
    return (mid_x, mid_y)

def slope_mid_perpend(x1, y1, x2, y2):
    return -1 * (x2 - x1) / (y2 - y1)

def distance(x1, y1, x2, y2):
    return math.sqrt((x1-x2) ** 2 + (y1-y2) ** 2)

def circleCenter(x1, y1, x2, y2, x3, y3):
    x12, y12 = midPoint(x1, y1, x2, y2)
    x13, y13 = midPoint(x1, y1, x3, y3)
    if y1 == y2:
        k_mid_13 = slope_mid_perpend(x1, y1, x3, y3)
        x0 = x12
        y0 = k_mid_13 * (x0 - x13) + y13
    elif y1 == y3:
        k_mid_12 = slope_mid_perpend(x1, y1, x2, y2)
        x0 = x13
        y0 = k_mid_12 * (x0 - x12) + y12
    else:
        k_mid_12 = slope_mid_perpend(x1, y1, x2, y2)
        k_mid_13 = slope_mid_perpend(x1, y1, x3, y3)
        y0 = (y13 - y12 + k_mid_12 * x12 - k_mid_13 * x13) / (k_mid_12 - k_mid_13)
        x0 = (y0 - y12) / k_mid_12 + x12
    return x0, y0
x0, y0 = circleCenter(x1, y1, x2, y2, x3, y3)
def angle(distance1, distance2):
    angle = math.asin((distance1/2) / distance2)
    return 2 * angle
d_12 = distance(x1, y1, x2, y2)
d_13 = distance(x1, y1, x3, y3)
d_32 = distance(x3, y3, x2, y2)
##print d_12, d_13, d_32
r = distance(x1, y1, x0, y0)
angle1O2 = angle(d_12, r)
angle1O3 = angle(d_13, r)
angle3O2 = angle(d_32, r)

##print angle1O2, angle1O3, angle3O2
##
##print angle(math.sqrt(2), 1)

def isRemainder(angle, angle_N):
    remainder = angle % angle_N
    if (remainder == 0) or (abs(remainder - angle_N) <= EPSILON):
        return True
    else:
        return False

def find_N(angle1, angle2, angle3):
    N = 3
    while 1:
##        print 'N', N
##        print angle1, angle1, angle3
        angle_N = 2 * math.pi / N
##        print 'angle_N', angle_N
        remainder1 = angle1 % angle_N
        remainder2 = angle2 % angle_N
        remainder3 = angle3 % angle_N
##        print remainder1, remainder2, remainder3
        if  (isRemainder(angle1, angle_N) and  isRemainder(angle2, angle_N) and
             isRemainder(angle2, angle_N)):
            break
        N += 1

    return N

print find_N(angle1O2, angle1O3, angle3O2)

## test
##print circleCenter(x1, y1, x2, y2, x3, y3)
##
##import math
##
##x0, y0 = circleCenter(x1, y1, x2, y2, x3, y3)
##print distance(x0, y0, x1, y1), distance(x0, y0, x2, y2), distance(x0, y0, x2, y2)

from math import *
X1,Y1=raw_input().strip().split(' ')
X2,Y2=raw_input().strip().split(' ')
X3,Y3=raw_input().strip().split(' ')
X1,Y1=float(X1),float(Y1)
X2,Y2=float(X2),float(Y2)
X3,Y3=float(X3),float(Y3)
length=[sqrt(abs(X1-X2)+abs(Y1-Y2)),sqrt(abs(X1-X3)+abs(Y1-Y3)),sqrt(abs(X2-X3)+abs(Y3-Y2))]
degree1=degrees(acos((length[0]**2+length[1]**2-length[2]**2)/float(2*length[0]*length[1])))
degree2=degrees(acos((length[0]**2+length[2]**2-length[1]**2)/float(2*length[0]*length[2])))
degree3=degrees(acos((length[2]**2+length[1]**2-length[0]**2)/float(2*length[2]*length[1])))
degree=max(degree1,degree2,degree3)
if degree>180:
	degree=360-degree
n=360//(180-degree)
area=((min(length)**2)*n)/float(4*tan(radians(180/n)))
print area

x1, y1 = map(float, raw_input().split())
x2, y2 = map(float, raw_input().split())
x3, y3 = map(float, raw_input().split())
import math
##x1 = 0.0; y1 = 0.0
##x2 = 0.0; y2 = 1.0
##x3 = 1.0; y3 = 0.0
EPSILON = 0.0000001
def midPoint(x1, y1, x2, y2):
    mid_x = (x1 + x2) / 2
    mid_y = (y1 + y2) / 2
    return (mid_x, mid_y)

def slope_mid_perpend(x1, y1, x2, y2):
    return -1 * (x2 - x1) / (y2 - y1)

def distance(x1, y1, x2, y2):
    return math.sqrt((x1-x2) ** 2 + (y1-y2) ** 2)

def circleCenter(x1, y1, x2, y2, x3, y3):
    x12, y12 = midPoint(x1, y1, x2, y2)
    x13, y13 = midPoint(x1, y1, x3, y3)
    if y1 == y2:
        k_mid_13 = slope_mid_perpend(x1, y1, x3, y3)
        x0 = x12
        y0 = k_mid_13 * (x0 - x13) + y13
    elif y1 == y3:
        k_mid_12 = slope_mid_perpend(x1, y1, x2, y2)
        x0 = x13
        y0 = k_mid_12 * (x0 - x12) + y12
    else:
        k_mid_12 = slope_mid_perpend(x1, y1, x2, y2)
        k_mid_13 = slope_mid_perpend(x1, y1, x3, y3)
        y0 = (y13 - y12 + k_mid_12 * x12 - k_mid_13 * x13) / (k_mid_12 - k_mid_13)
        x0 = (y0 - y12) / k_mid_12 + x12
    return x0, y0
x0, y0 = circleCenter(x1, y1, x2, y2, x3, y3)
def angle(distance1, distance2):
    angle = math.asin((distance1/2) / distance2)
    return 2 * angle
d_12 = distance(x1, y1, x2, y2)
d_13 = distance(x1, y1, x3, y3)
d_32 = distance(x3, y3, x2, y2)
##print d_12, d_13, d_32
r = distance(x1, y1, x0, y0)
angle1O2 = angle(d_12, r)
angle1O3 = angle(d_13, r)
angle3O2 = angle(d_32, r)

##print angle1O2, angle1O3, angle3O2
##
##print angle(math.sqrt(2), 1)

def isRemainder(angle, angle_N):
    remainder = angle % angle_N
    if (remainder == 0) or (abs(remainder - angle_N) <= EPSILON):
        return True
    else:
        return False

def find_N(angle1, angle2, angle3):
    N = 3
    while 1:
##        print 'N', N
##        print angle1, angle1, angle3
        angle_N = 2 * math.pi / N
##        print 'angle_N', angle_N
        remainder1 = angle1 % angle_N
        remainder2 = angle2 % angle_N
        remainder3 = angle3 % angle_N
##        print remainder1, remainder2, remainder3
        if  (isRemainder(angle1, angle_N) and  isRemainder(angle2, angle_N) and
             isRemainder(angle2, angle_N)):
            break
        N += 1

    return N
N = find_N(angle1O2, angle1O3, angle3O2)
def area_N(N):
    angle = 2 * math.pi / N
    area = N * 1/2 * r * r * math.sin(angle)
    return area

print area_N(N)

## test
##print circleCenter(x1, y1, x2, y2, x3, y3)
##
##import math
##
##x0, y0 = circleCenter(x1, y1, x2, y2, x3, y3)
##print distance(x0, y0, x1, y1), distance(x0, y0, x2, y2), distance(x0, y0, x2, y2)

from math import pi,tan,sin,cos,sqrt

def cot(x):
    return 1/tan(x)

def area(n,r):
    """Area of convex regular n-gon with radius r"""
    return 0.5*n*r*r*sin(2*pi/n)

def rotate(v,theta):
    """
    Rotation matrix
    |cos(theta) -sin(theta)|
    |sin(theta)  cos(theta)|
    """
    return ( v[0]*cos(theta)-v[1]*sin(theta)
            ,v[0]*sin(theta)+v[1]*cos(theta)
           )

def add(v1,v2):
    return (v1[0]+v2[0], v1[1]+v2[1])

def sub(v1,v2):
    return (v1[0]-v2[0], v1[1]-v2[1])

def mult(v,f):
    return (f*v[0],f*v[1])

def norm(v):
    return sqrt(v[0]**2+v[1]**2)

def find_circle(a,b,c):
    """Find the circle that going through points a,b,c in the plane. """
    dir1 = mult(sub(b,a),1/norm(sub(b,a)))
    dir1 = rotate(dir1,pi/2)
    half1 = add(a,mult(sub(b,a),1/2))
    a1,b1 = dir1[0],dir1[1]
    r1,s1 = half1[0],half1[1]

    dir2 = mult(sub(c,b),1/norm(sub(c,b)))
    dir2 = rotate(dir2,pi/2)
    half2 = add(b,mult(sub(c,b),1/2))
    a2,b2 = dir2[0],dir2[1]
    r2,s2 = half2[0],half2[1]

    x = (s1-s2+r2*(b2/a2)-r1*(b1/a1))/((b2/a2)-(b1/a1))
    y = (x-r1)*(b1/a1)+s1
    center = (x,y)
    radius = norm(sub(center,a))
    return (center, radius)

def find_polygon(a,b,c):
    center, r = find_circle(a,b,c)
    v0 = sub(a,center)
    for n in range(3,101):
        theta = 2*pi/n
        vertices = [a]
        b_found = False
        c_found = False
        for i in range(n):
            vi = rotate(v0,i*theta)
            g = add(center,vi)
            vertices.append(g)

            if norm(sub(g,b))< 1e-4:
                b_found = True
            elif norm(sub(g,c)) < 1e-4:
                c_found = True
        if b_found and c_found:
            print('hey')
            return (n,r)

a = [float(i) for i in input().split()]
b = [float(i) for i in input().split()]
c = [float(i) for i in input().split()]

n,r = find_polygon(a,b,c)
print(area(n,r))

import math
from sys import stdin

def get_length(p1, p2):
    return math.sqrt(math.pow(p1[0] - p2[0], 2) + math.pow(p1[1] - p2[1], 2))

def get_angle(p1, p2, p3):
    return math.acos((
                             math.pow(get_length(p1, p2), 2) +
                             math.pow(get_length(p1, p3), 2) -
                             math.pow(get_length(p2, p3), 2)
                     )
                     /
                     (2 * get_length(p1, p2) * get_length(p1, p3))
                     )

def get_radius(p1, p2, p3):
    a, b, c = get_length(p1, p2), get_length(p2, p3), get_length(p1, p3)
    s = (a + b + c) / 2
    area = math.sqrt(s * (s - a) * (s - b) * (s - c))
    return a * b * c / 4 / area

def gcd(x, y):
    while y > 0.00000000001:
        x, y = y, x % y
    return x

def main():
    x1, y1 = map(float, stdin.readline().strip().split())
    p1 = (x1, y1)
    x2, y2 = map(float, stdin.readline().strip().split())
    p2 = (x2, y2)
    x3, y3 = map(float, stdin.readline().strip().split())
    p3 = (x3, y3)
    A = get_angle(p1, p2, p3)
    B = get_angle(p2, p1, p3)
    C = get_angle(p3, p1, p2)
    radius = get_radius(p1, p2, p3)
    n = math.pi / gcd(gcd(A, B), C)
    area = n / 2 * math.pow(radius, 2) * math.sin(2 * math.pi / n)
    print(area)

if __name__ == "__main__":
    main()

"""
http://codeforces.com/problemset/problem/1/A
"""

import sys
import math

def gcd(a, b):
	if a < b:
		a, b = b, a

	while b > 1:
		a, b = b, a - b

	return a

def square(arr):
	a = math.sqrt( (arr[2][0]-arr[1][0])**2 + (arr[2][1]-arr[1][1])**2 )
	b = math.sqrt( (arr[2][0]-arr[0][0])**2 + (arr[2][1]-arr[0][1])**2 )
	c = math.sqrt( (arr[1][0]-arr[0][0])**2 + (arr[1][1]-arr[0][1])**2 )
	p = 0.5 * (a+b+c)
	R = a*b*c / (4 * math.sqrt(p*(p-a)*(p-b)*(p-c)))

	alpha = math.acos( round((2*R**2-c**2)/(2*R**2), 6) )
	beta = 	math.acos( round((2*R**2-a**2)/(2*R**2), 6) )
	gamma = math.acos( round((2*R**2-b**2)/(2*R**2), 6) )

	delta = gcd(alpha, gcd(beta, gamma))
	n = math.floor(2*math.pi / delta)
	s = (n/2)*(R**2)*math.sin(2*math.pi/n)

	return s

def main():
	arr = []

	for i in range(3):
		l = sys.stdin.readline()
		x, y = [float(t) for t in l.split()]
		arr.insert(i-1, (x, y))

	s = square(arr)
	print("%.6f" % s)

if __name__ == '__main__':
	main()

from itertools import *
from math import *

def mid_line((x1, y1), (x2, y2)):
    return x2-x1, y2-y1, (x1**2 - x2**2 + y1**2 - y2**2)/2.0

def intersect((a1, b1, c1), (a2, b2, c2)):
    d = a1*b2-b1*a2
    return (b1*c2-b2*c1)/d, (a2*c1-a1*c2)/d

def vect((x0, y0), (x1, y1)):
    return x1-x0, y1-y0

def dot((a1, b1), (a2, b2)):
    return a1*a2+b1*b2

def length(a):
    return sqrt(dot(a, a))

def angle(c, p1, p2):
    a, b = vect(p1, c), vect(p2, c)
    return acos(dot(a, b) / (length(a) * length(b) + 1.0e-100))

def gcd(a, b):
    while abs(b) > pi/100:
        b, a = fmod(a, b), b
    return a

p = [map(float, raw_input().split()) for i in xrange(3)]
c = intersect(mid_line(p[0], p[1]), mid_line(p[2], p[1]))
t = reduce(gcd, [angle(c, p1, p2) for p1, p2 in combinations(p, 2)])
R = length(vect(p[0], c))
print R**2*pi/t*sin(t)

from time import *
from math import *

def dist(x1,y1,x2,y2):
	return ((x1-x2)**2+(y1-y2)**2)**0.5

def isInteger(x):
	return abs(x-round(x))<1e-2

def area(x1,y1,x2,y2,x3,y3):
	a=dist(x1,y1,x2,y2)
	b=dist(x3,y3,x2,y2)
	c=dist(x1,y1,x3,y3)
	d=(a+b+c)/2
	return (d*(d-a)*(d-b)*(d-c))**0.5

def radiusOuter(x1,y1,x2,y2,x3,y3):
	return a*b*c/area(x1,y1,x2,y2,x3,y3)/4

def linePass2Point(x1,y1,x2,y2):
	a=y2-y1
	b=x1-x2
	c=-a*x1-b*y1
	return a,b,c

def intersect(a1,b1,c1,a2,b2,c2):
	y=-(a2*c1-a1*c2)/(a2*b1-a1*b2)
	x=-(b2*c1-b1*c2)/(b2*a1-b1*a2)
	return x,y

def midLine(x1,y1,x2,y2):
	a1,b1,c1=linePass2Point(x1,y1,x2,y2)
	a2,b2=-b1,a1
	x,y=(x1+x2)/2,(y1+y2)/2
	c2=-(a2*x+b2*y)
	return a2,b2,c2

def centerOfOuterTriangle(x1,y1,x2,y2,x3,y3):
	a1,b1,c1=midLine(x1,y1,x2,y2)
	a2,b2,c2=midLine(x1,y1,x3,y3)
	x,y=intersect(a1,b1,c1,a2,b2,c2)
	return x,y,dist(x,y,x1,y1)

def angle(x1,y1,x2,y2,x3,y3):
	# tính góc đối diện với [x1,y1],[x2,y2]
	c=dist(x1,y1,x2,y2)
	b=dist(x3,y3,x2,y2)
	a=dist(x1,y1,x3,y3)
	tg=(a*a+b*b-c*c)/(2*a*b)
	if tg<=-1:
		tg+=1e-5
	elif tg>=1:
		tg-=1e-5
	return acos(tg)

def areaByRadius(r,n):
	return r*r*n*sin(2*pi/n)/2

x1,y1=[float(i) for i in input().split()]
x2,y2=[float(i) for i in input().split()]
x3,y3=[float(i) for i in input().split()]

def check(n):
	global x,y,r
	a=2*pi/n
	return isInteger(a1/a) and isInteger(a2/a) and isInteger(a3/a)

x,y,r=centerOfOuterTriangle(x1,y1,x2,y2,x3,y3)
# print(x,y,r)
a1=angle(x1,y1,x2,y2,x,y)
a2=angle(x3,y3,x2,y2,x,y)
a3=angle(x1,y1,x3,y3,x,y)
for i in range(3,101):
	a=2*pi/i
	# print(i,round(areaByRadius(r,i),8),a1/a,a2/a,a3/a)
	if  isInteger(a1/a) and isInteger(a2/a) and isInteger(a3/a):
		print(round(areaByRadius(r,i),4))
		break

import math
from decimal import *
getcontext().prec = 15
Ax,Ay = input().split()
Bx,By = input().split()
Cx,Cy = input().split()
Ax=Decimal(Ax)
Bx=Decimal(Bx)
Cx=Decimal(Cx)
Ay=Decimal(Ay)
By=Decimal(By)
Cy=Decimal(Cy)
AB = Decimal(math.sqrt((Ax-Bx)**2+(Ay-By)**2))
BC = Decimal(math.sqrt((Cx-Bx)**2+(Cy-By)**2))
CA = Decimal(math.sqrt((Ax-Cx)**2+(Ay-Cy)**2))
#A= Decimal(math.acos((AB**2+CA**2-BC**2)/(2*AB*CA)))
#B= Decimal(math.acos((BC**2+AB**2-CA**2)/(2*AB*BC)))
#C= Decimal(math.acos((BC**2+CA**2-AB**2)/(2*BC*CA)))
#Sx=Decimal((Ax*Decimal(math.sin(2*A))+Bx*Decimal(math.sin(2*B))+Cx*Decimal(math.sin(2*C)))/(Decimal(math.sin(2*A))+Decimal(math.sin(2*B))+Decimal(math.sin(2*C))))
#Sy=Decimal((Ay*Decimal(math.sin(2*A))+By*Decimal(math.sin(2*B))+Cy*Decimal(math.sin(2*C)))/(Decimal(math.sin(2*A))+Decimal(math.sin(2*B))+Decimal(math.sin(2*C))))
#R= Decimal(math.sqrt((Ax-Sx)**2+(Ay-Sy)**2))
R = Decimal(AB)*Decimal(BC)*Decimal(CA)/Decimal(math.sqrt((Decimal(AB+BC+CA)*(Decimal(BC+CA-AB))*(Decimal(CA+AB-BC))*(Decimal(AB+BC-CA)))))
for x in range(2,101):
    if(math.fabs(R*(Decimal(2*math.sin(math.pi/x)))-round(R*Decimal((2*math.sin(math.pi/x)))))<.005):
        #print('{:.15f}'.format(math.fabs(R*(Decimal(2*math.sin(math.pi/x)))-round(R*Decimal((2*math.sin(math.pi/x)))))))
        print('{:.10f}'.format(Decimal(.5)*Decimal(x)*Decimal(R)*Decimal(R)*Decimal(math.sin(Decimal(2)*Decimal(math.pi)/Decimal(x)))))
        #/Decimal((1+(Decimal(math.fabs(R*(Decimal(2*math.sin(math.pi/x)))-round(R*Decimal((2*math.sin(math.pi/x)))))))))))
        #print(Decimal(x))
        #print(Decimal(R))
        #print(Decimal(math.sin(Decimal(2)*Decimal(math.pi)/Decimal(x))))

from sys import stdin, stdout
import math

def find_radius(a,b,c):
    e=math.sqrt((a+b+c)*(b+c-a)*(a+c-b)*(a+b-c))
    r=(a*b*c)/e
    return r

def length(x,y):
    return math.sqrt(x**2+y**2)

def dot(x1,y1,x2,y2):
    return x1*x2+y1*y2

def find_angles(x1,y1,x2,y2,x3,y3):
    ax=x2-x1
    ay=y2-y1
    bx=x3-x1
    by=y3-y1
    cx=x3-x2
    cy=y3-y2
    theta1=math.acos((dot(ax,ay,bx,by)/(length(ax,ay)*length(bx,by))))
    theta2=math.acos((dot(-ax,-ay,cx,cy)/(length(ax,ay)*length(cx,cy))))
    theta3=math.acos((dot(-bx,-by,-cx,-cy)/(length(cx,cy)*length(bx,by))))
    theta1=2*theta1
    theta2=2*theta2
    theta3=2*theta3
    return theta1,theta2,theta3

def equal(x,y):
    if abs(x-y)<=0.00001:
        return True
    return False

def gcd(x,y):
    if x<y:
        return gcd(y,x)
    else:
        a=int(x/y)
        if equal(0,x-a*y):
            return y
        else:
            return gcd(y,x-a*y)

def main(x1,y1,x2,y2,x3,y3):
    t1,t2,t3=find_angles(x1,y1,x2,y2,x3,y3)
    t=gcd(gcd(t1,t2),t3)
    n1=int(t1/t)
    n2=int(t2/t)
    n3=int(t3/t)
    n=n1+n2+n3
    a=length(x2-x1,y2-y1)
    b=length(x3-x1,y3-y1)
    c=length(x3-x2,y3-y2)
    r=find_radius(a,b,c)
    return n*0.5*math.sin(t)*(r**2)

def parse(myString):
    i=0
    l=len(myString)
    while myString[i]!=" ":
        i+=1
    string1=myString[0:i]
    string2=myString[i+1:l-1]
    return float(string1),float(string2)

a=[0,0,0,0,0,0]
i=0
for j in range(3):
    cell=stdin.readline()
    parse(cell)
    a[i],a[i+1]=parse(cell)
    i+=2
area=main(a[0],a[1],a[2],a[3],a[4],a[5])
print area

from math import *

def gcd(x,y):
    if y < 1e-3:
        return x
    else:
        return gcd(y,fmod(x,y))

def area(a, b, c):
    s = (a + b + c) / 2
    return sqrt(s*(s-a)*(s-b)*(s-c))

point = [list(map(float,input().split())) for i in range(3)]

a,b,c = [sqrt((x1-x2)*(x1-x2)+(y1-y2)*(y1-y2)) for (x1,y1),(x2,y2) in
         [(point[0],point[1]),(point[0],point[2]), (point[1],point[2])]]
A,B,C = [acos((y*y+z*z-x*x)/2/z/y) for x,y,z in [(a,b,c),(b,c,a),(c,a,b)]]

S = area(a, b, c)
R = a * b * c / 4 * S
gcd_ = gcd(A, gcd(B, C))
n = pi / gcd_
print(round(R*R*n*sin((2*pi)/n))/2,7)

from math import *

def LineIntersect(a,b):
    det=lambda a,b,c,d:a*d-b*c
    z=det(a[0],a[1],b[0],b[1])
    return (-det(a[2],a[1],b[2],b[1])/z,-det(a[0],a[2],b[0],b[2])/z)

def GetCircleInOrigin(A):
    GetNormal=lambda (x,y):(-y,x)
    GetDif=lambda (x1,y1),(x2,y2):(x1-x2,y1-y2)
    GetSum=lambda (x1,y1),(x2,y2):(x1+x2,y1+y2)
    GetMultToCof=lambda (x1,y1),c:(x1*c,y1*c)
    NormalLine=lambda (a,b):(b[1]-a[1],a[0]-b[0],a[1]*b[0]-a[0]*b[1])
    L=[ (GetSum(GetMultToCof(GetDif(A[i+1],A[i]),0.5),A[i]),GetSum(GetSum(GetMultToCof(GetDif(A[i+1],A[i]),0.5),A[i]),GetNormal(GetDif(A[i+1],A[i])))) for i in range(2)]
    L=map(NormalLine,L)
    L=LineIntersect(L[0],L[1])
    return map(lambda x:GetDif(x,L),A)

def norm(a):
    if (a<0):
        return a+2*pi
    else:
        return a

eps=0.000001
A=[map(float,raw_input().split()) for i in range(3)]
A=GetCircleInOrigin(A)
C=[atan2(y,x) for x,y in A]
for i in range(3):
    if (C[i]<0):
        C[i]+=2*pi
C=sorted(C)
print C
omega=0
R=hypot(*A[0])
for p in range(3,101):
    alpha=2*pi/p
    for a1 in xrange (1,p):
        for a2 in range (1,p-a1):
            a3=p-a1-a2
            if (omega==0) and (abs(norm(C[1]-C[0]-a1*alpha))<=eps) and (abs(norm(C[2]-C[1]-a2*alpha))<=eps) and (abs(norm(C[0]-C[2]-a3*alpha))<=eps):
                omega=alpha
print R**2*pi/omega*sin(omega)

from math import *

kordinat = [list(map(float, input().split())) for i in range(3)]
a, b, c = [hypot(x1 - x2, y1 - y2) for (x1, y1), (x2, y2) in [
    (kordinat[0], kordinat[1]), (kordinat[0], kordinat[2]), (kordinat[1],kordinat[2])
    ]]
A, B, C = [acos((z*z + y*y - x*x) / 2 / y / z) for x,y,z in [(a,b,c), (b,c,a), (c,a,b)]]
Radius = a / (2 * sin(A))
def g(x, y):
    if y < 1e-3:
        return x
    else:
        return g(y, fmod(x, y))
u = 2 * g(A,g(B, C))
Area = round((pi * Radius * Radius) / (u * sin(u)), 7)
print(Area)

#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Created on Tue Mar 10 20:19:16 2015
kristof.jakab@hegelab.org
"""

import math

class Point(object):
    """ """
    def __init__(self, x, y):
        self.x = x
        self.y = y
        self.vabs = math.sqrt(x ** 2 + y ** 2)

class Line(object):
    """ """
    def __init__(self, A, B):
        self.direction = Point(B.x - A.x, B.y - A.y)
        self.length = math.sqrt((B.x - A.x) ** 2 + (B.y - A.y) ** 2)

def calculate_angle(point_A, point_B):
    ab = point_A.x * point_B.x + point_A.y * point_B.y
    cos_angle = ab / (point_A.vabs * point_B.vabs)
    # return round(math.degrees(math.acos(cos_angle)), 6)
    return math.acos(cos_angle)

def calculate_area(n, R):
    area = 0.5 * n * R * R * math.sin(2 * math.pi / n)
    return area

A = Point(*map(float, raw_input().split()))
B = Point(*map(float, raw_input().split()))
C = Point(*map(float, raw_input().split()))

AB = Line(A, B)
AC = Line(A, C)

BA = Line(B, A)
BC = Line(B, C)

a = calculate_angle(AB.direction, AC.direction) * 2
b = calculate_angle(BA.direction, BC.direction) * 2

if a > math.pi:
    a = 2 * math.pi - a
if b > math.pi:
    b = 2 * math.pi - b

c = 2 * math.pi - (a + b)

# R = (BC.length / 2) / math.sin(math.radians(a / 2))
R = (BC.length / 2) / math.sin(a / 2)

for x in xrange(1, 100):
    y = x * (a / c)
    z = x * (b / c)
    if round(y, 1) % 1 == 0 and round(z, 1) % 1 == 0:
        n = int(round(x + y + z, 0))
        break

print calculate_area(n, R)

from math import sqrt, sin, acos, pi

dist_sq = lambda A, B: (A[0] - B[0])**2 + (A[1] - B[1])**2

def angle(R, A, B):
    c = dist_sq(A, B)
    a = dist_sq(R, B)
    b = dist_sq(R, A)
    cosine = (a + b - c)/sqrt(4 * a * b)
    return acos(cosine)

def circumcentre(A, B, C):
    a = dist_sq(B, C)
    b = dist_sq(A, C)
    c = dist_sq(A, B)
    bary = (
        a * (b + c - a),
        b * (c + a - b),
        c * (a + b - c),
    )
    x = (bary[0] * A[0] + bary[1] * B[0] + bary[2] * C[0])/sum(bary)
    y = (bary[0] * A[1] + bary[1] * B[1] + bary[2] * C[1])/sum(bary)
    return (x, y)

def div(m, n):
    m, n = max(m, n), min(m, n)
    return abs(round(m/n) - m/n) < 10**-6

def gcd(a, b):
    a, b = max(a, b), min(a, b)
    if div(a, b):
        return b
    else:
        return gcd(b, a-b)

A = tuple(map(float, input().split()))
B = tuple(map(float, input().split()))
C = tuple(map(float, input().split()))
cir = circumcentre(A, B, C)
R = dist_sq(cir, A)

angles = sorted([angle(cir, A, B), angle(cir, B, C), angle(cir, C, A)])
gamma = gcd(angles[0], angles[1])
print(pi * R * sin(gamma)/gamma)

##x1, y1 = map(float, raw_input().split())
##x2, y2 = map(float, raw_input().split())
##x3, y3 = map(float, raw_input().split())
import math
x1 = 71.756151; y1 = 7.532275
x2 = -48.634784; y2 = 100.159986
x3 = 91.778633; y3 = 158.107739

##x1 = 0.0; y1 = 0.0
##x2 = 0.0; y2 = 1.0
##x3 = math.sqrt(3); y3 = 1.0

EPSILON = 0.0000001
def midPoint(x1, y1, x2, y2):
    mid_x = (x1 + x2) / 2
    mid_y = (y1 + y2) / 2
    return (mid_x, mid_y)

def slope_mid_perpend(x1, y1, x2, y2):
    return -1 * (x2 - x1) / (y2 - y1)

def distance(x1, y1, x2, y2):
    return math.sqrt((x1-x2) ** 2 + (y1-y2) ** 2)

def circleCenter(x1, y1, x2, y2, x3, y3):
    x12, y12 = midPoint(x1, y1, x2, y2)
    x13, y13 = midPoint(x1, y1, x3, y3)
    if y1 == y2:
        k_mid_13 = slope_mid_perpend(x1, y1, x3, y3)
        x0 = x12
        y0 = k_mid_13 * (x0 - x13) + y13
    elif y1 == y3:
        k_mid_12 = slope_mid_perpend(x1, y1, x2, y2)
        x0 = x13
        y0 = k_mid_12 * (x0 - x12) + y12
    else:
        k_mid_13 = slope_mid_perpend(x1, y1, x3, y3)
        k_mid_12 = slope_mid_perpend(x1, y1, x2, y2)
        x0 = (y13 - y12 + k_mid_12*x12 - k_mid_13*x13) / (k_mid_12 - k_mid_13)
        y0 = k_mid_13 * (x0 - x13) + y13
    return x0, y0
x0, y0 = circleCenter(x1, y1, x2, y2, x3, y3)
def angle(distance1, distance2):
    angle = math.asin((distance1/2) / distance2)
    return 2 * angle
d_12 = distance(x1, y1, x2, y2)
d_13 = distance(x1, y1, x3, y3)
d_32 = distance(x3, y3, x2, y2)
##print d_12, d_13, d_32
r = distance(x1, y1, x0, y0)

angle1O2 = angle(d_12, r)
angle1O3 = angle(d_13, r)
angle3O2 = angle(d_32, r)
##print angle1O2, angle1O3, angle3O2

##print angle1O2, angle1O3, angle3O2
##
##print angle(math.sqrt(2), 1)

def isRemainder(angle, angle_N):
    remainder = angle % angle_N
##    print remainder

    if (abs(remainder - 0)<= EPSILON) or (abs(remainder - angle_N) <= EPSILON):
        return True
    else:
        return False

def find_N(angle1, angle2, angle3):
    N = 3
    while 1:
##        print angle1, angle1, angle3
        angle_N = 2 * math.pi / N
##        print 'angle_N', angle_N
##        remainder1 = angle1 % angle_N
##        remainder2 = angle2 % angle_N
##        remainder3 = angle3 % angle_N
##        print remainder1, remainder2, remainder3
        if  (isRemainder(angle1, angle_N) and  isRemainder(angle2, angle_N) and
             isRemainder(angle2, angle_N)):
            break
        N += 1

    return N
N = find_N(angle1O2, angle1O3, angle3O2)
def area_N(N):
    angle = 2 * math.pi / N
    area = N * 0.5 * r * r * math.sin(angle)
    return area

print area_N(N)

##print angle1O3, 2 * math.pi / 6
##print angle1O3 % (2 * math.pi / 6)

## test
##print circleCenter(x1, y1, x2, y2, x3, y3)
##
##import math
##
##x0, y0 = circleCenter(x1, y1, x2, y2, x3, y3)
##print distance(x0, y0, x1, y1), distance(x0, y0, x2, y2), distance(x0, y0, x2, y2)

import math
import sys

def read_input():
    [input_1,input_2,input_3] = sys.stdin.readlines()
    x1,y1=input_1.strip().split()
    x2,y2=input_2.strip().split()
    x3,y3=input_3.strip().split()
    x1 = float(x1)
    x2 = float(x2)
    x3 = float(x3)
    y1 = float(y1)
    y2 = float(y2)
    y3 = float(y3)
    return x1,x2,x3,y1,y2,y3

def outer_center(x1,x2,x3,y1,y2,y3):
    A1=2*(x2-x1)
    B1=2*(y2-y1)
    C1=x2*x2+y2*y2-x1*x1-y1*y1
    A2=2*(x3-x2)
    B2=2*(y3-y2)
    C2=x3*x3+y3*y3-x2*x2-y2*y2

    x = ((C1*B2)-(C2*B1))/((A1*B2)-(A2*B1))
    y = ((A1*C2)-(A2*C1))/((A1*B2)-(A2*B1))

    return x,y

def get_degree(x1,x2,x3,y1,y2,y3):
    A = math.sqrt((x1-x2)*(x1-x2)+(y1-y2)*(y1-y2))
    B = math.sqrt((x3-x2)*(x3-x2)+(y3-y2)*(y3-y2))
    C = math.sqrt((x1-x3)*(x1-x3)+(y1-y3)*(y1-y3))

    c = math.acos((A**2 + B**2 - C**2)/(2 * A * B)) * 180 /math.pi
    b = math.acos((A**2 + C**2 - B**2)/(2 * A * C)) * 180 /math.pi
    a = math.acos((B**2 + C**2 - A**2)/(2 * C * B)) * 180 /math.pi

    return a,b,c

def find_gcd(a,b,c):
    a = int(round(a))
    b = int(round(b))
    c = int(round(c))
    temp1 = math.gcd(a,b)
    temp2 = math.gcd(temp1,c)
    return temp2

def determine_angles(gcd):
    return int(180/gcd)

def get_radius(x0,y0,x1,y1):
    return math.sqrt((x0-x1)**2+(y0-y1)**2)

if __name__ == "__main__":
    eps = 0.0001 # Accuracy adjustment
    DEBUG = 0
    x1,x2,x3,y1,y2,y3 = read_input()
    if DEBUG == 1:
        print("success!")
    x,y = outer_center(x1,x2,x3,y1,y2,y3)
    if DEBUG == 1:
        print("x=",x,"y=",y)
    a,b,c = get_degree(x1,x2,x3,y1,y2,y3)
    if DEBUG == 1:
        print("angle A=",a,"angle B=",b,"angle C=",c)
    r = get_radius(x,y,x1,y1)
    if DEBUG == 1:
        print("r=",r)
    if abs(a-round(a))>eps or abs(b-round(b))>eps or abs(c-round(c))>eps:# cannot use direct round for now
        smallest = min(a,min(b,c))
        largest = max(a,max(b,c))
        N = 0
        for i in range(1,2000):
            if abs(smallest*i-round(smallest*i))<eps and (smallest*i-180)>-eps: # potentially find the N
                if abs((smallest * i/180) - round (smallest*i/180)) <eps:
                    gcd_angle = math.gcd(int(round(largest*i)),int(round(smallest*i)))
                    if DEBUG == 1:
                        print("gcd_angle=",gcd_angle)
                    if  gcd_angle == int(round(smallest*i)):
                        N = i
                        if DEBUG == 1:
                            print("hit")
                        break
                    else:
                        t = 180/gcd_angle*i
                        if DEBUG == 1:
                            print("miss", 180/gcd_angle*i)
                        for j in range(1,20):
                            if abs(t*j-round(t*j))<eps:
                                N = int(t*j)
                                break
                        break
        if N == 0:
            N = 45
        if DEBUG == 1:
            print("Using alternative method, N =",N)

    else:
        gcd = find_gcd(a,b,c)
        if DEBUG == 1:
            print("gcd=",gcd)
        N = determine_angles(gcd)
        if DEBUG == 1:
            print("N=",N)

    area = 0.5*N*r*r*math.sin(2/N*math.pi)
    print("%.6f"%area)

import math
from fractions import Fraction
line = input()
data = line.split()
x1, y1 = float(data[0]), float(data[1])
line = input()
data = line.split()
x2, y2 = float(data[0]), float(data[1])
line = input()
data = line.split()
x3, y3 = float(data[0]), float(data[1])
dis12 = (x1 - x2) * (x1 - x2) + (y1 - y2) * (y1 - y2)
dis23 = (x2 - x3) * (x2 - x3) + (y2 - y3) * (y2 - y3)
dis13 = (x1 - x3) * (x1 - x3) + (y1 - y3) * (y1 - y3)
cos1 = (dis13 + dis12 - dis23) / (2 * math.sqrt(dis12 * dis13))
cos2 = (dis23 + dis12 - dis13) / (2 * math.sqrt(dis23 * dis12))
angle1 = math.acos(cos1) * 2
angle2 = math.acos(cos2) * 2
number = Fraction.from_float(angle1 / angle2).limit_denominator(101)
l = angle1 / number.numerator
n = int(2 * math.pi / l + 0.5)
sin1 = math.sqrt(1 - cos1 * cos1)
r = math.sqrt(dis23) / (2 * sin1)
area = 1 / 2 * n * math.sin(2 * math.pi / n) * r * r
print('%.6f' % area)

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

def area(d):
    if len(d) < 3:
        return False
    a = 0.0
    p = 0.5 * (d[0] + d[1] + d[2])
    a = math.sqrt(p*(p-d[0])*(p-d[1])*(p-d[2]))
    return a

def circumcircle(x,y):
    distance = euclidean(x,y)
    triangle_area = area(distance)
    return distance[0] * distance[1] * distance[2] / (4 * triangle_area)

def euclidean(x,y):
    d = []
    d.append(math.sqrt((x[0]-x[1])**2 + (y[0]-y[1])**2))
    d.append(math.sqrt((x[0]-x[2])**2 + (y[0]-y[2])**2))
    d.append(math.sqrt((x[1]-x[2])**2 + (y[1]-y[2])**2))
    return d

def centerAngle(d,radius):
    angle = []
    #print(type(d[0]), type(radius))
    #print(d[0]/(2*radius))
    #print(2 * math.asin( d[0] / (2*radius) ) )
    angle.append(2*math.asin(d[0]/(2*radius)))
    angle.append(2*math.asin(d[1]/(2*radius)))
    angle.append(2*math.asin(d[2]/(2*radius)))
    return angle

def gcd(a,b):
    if a < 0.01:
        return b
    else:
        return gcd(math.fmod(b,a),a)
def main():

    # get the input data
    x = []
    y = []
    for i in range(3):
        temp_input = input().split()
        x.append(float(temp_input[0]))
        y.append(float(temp_input[1]))

    # 1. calculate the length of the edge
    # 2. calculate the area of the triangle
    # 3. calculate the radius of the circumcircle
    # 4. calculate the area of the Berland Circus

    edge_length = euclidean(x,y)

    triangle_area = area(edge_length)

    circumcircle_radius = circumcircle(x,y)

    #print("circumcircle_radius: {0[0]}:{1[0]},{0[1]}:{1[1]}, {0[2]}:{1[2]} \n {2}".format(x,y,circumcircle_radius))
    # 5. calculat the cetral angle and their gcd
    angle = centerAngle(edge_length, circumcircle_radius)

    gcd_angle = gcd(gcd(angle[0], angle[1]), angle[2])

    result = 2 * math.pi / gcd_angle * circumcircle_radius * math.sin(gcd_angle) * circumcircle_radius * 0.5

    #print("circumcircle_radius",circumcircle_radius)
    #print("totoal_angle",angle)
    #print("gcd_angle",gcd_angle)
    #print("len",edge_length)
    print("{:.8f}".format(result))

if __name__ == "__main__":
    main()

from time import *
from math import *

def dist(x1,y1,x2,y2):
	return ((x1-x2)**2+(y1-y2)**2)**0.5

def isInteger(x):
	return abs(x-round(x))<1e-2

def area(x1,y1,x2,y2,x3,y3):
	a=dist(x1,y1,x2,y2)
	b=dist(x3,y3,x2,y2)
	c=dist(x1,y1,x3,y3)
	d=(a+b+c)/2
	return (d*(d-a)*(d-b)*(d-c))**0.5

def radiusOuter(x1,y1,x2,y2,x3,y3):
	return a*b*c/area(x1,y1,x2,y2,x3,y3)/4

def linePass2Point(x1,y1,x2,y2):
	a=y2-y1
	b=x1-x2
	c=-a*x1-b*y1
	return a,b,c

def intersect(a1,b1,c1,a2,b2,c2):
	y=-(a2*c1-a1*c2)/(a2*b1-a1*b2)
	x=-(b2*c1-b1*c2)/(b2*a1-b1*a2)
	return x,y

def midLine(x1,y1,x2,y2):
	a1,b1,c1=linePass2Point(x1,y1,x2,y2)
	a2,b2=-b1,a1
	x,y=(x1+x2)/2,(y1+y2)/2
	c2=-(a2*x+b2*y)
	return a2,b2,c2

def centerOfOuterTriangle(x1,y1,x2,y2,x3,y3):
	a1,b1,c1=midLine(x1,y1,x2,y2)
	a2,b2,c2=midLine(x1,y1,x3,y3)
	x,y=intersect(a1,b1,c1,a2,b2,c2)
	return x,y,dist(x,y,x1,y1)

def angle(x1,y1,x2,y2,x3,y3):
	# tính góc đối diện với [x1,y1],[x2,y2]
	c=dist(x1,y1,x2,y2)
	b=dist(x3,y3,x2,y2)
	a=dist(x1,y1,x3,y3)
	tg=(a*a+b*b-c*c)/(2*a*b)
	tg=tg if -1+1e-4<=tg<=1-1e-4 else (-1+1e-4 if tg<-1 else 1-1e-4)
	return acos(tg)

def areaByRadius(r,n):
	return r*r*n*sin(2*pi/n)/2

x1,y1=[float(i) for i in input().split()]
x2,y2=[float(i) for i in input().split()]
x3,y3=[float(i) for i in input().split()]

def check(n):
	global x,y,r
	a=2*pi/n
	return isInteger(a1/a) and isInteger(a2/a) and isInteger(a3/a)

x,y,r=centerOfOuterTriangle(x1,y1,x2,y2,x3,y3)
# print(x,y,r)
a1=angle(x1,y1,x2,y2,x,y)
a2=angle(x3,y3,x2,y2,x,y)
a3=angle(x1,y1,x3,y3,x,y)
for i in range(3,101):
	a=2*pi/i
	# print(i,round(areaByRadius(r,i),8),a1/a,a2/a,a3/a)
	if  isInteger(a1/a) and isInteger(a2/a) and isInteger(a3/a):
		print(round(areaByRadius(r,i),8))
		break

from math import *
p1 = input()
p1x,p1y = p1.split(' ')
p2 = input()
p2x,p2y = p2.split(' ')
p3 = input()
p3x,p3y = p3.split(' ')
p1x = float(p1x)
p1y = float(p1y)
p2x = float(p2x)
p2y = float(p2y)
p3x = float(p3x)
p3y = float(p3y)
dis12 = sqrt((p1x-p2x)**2+(p1y-p2y)**2)
dis23 = sqrt((p2x-p3x)**2+(p2y-p3y)**2)
dis13 = sqrt((p1x-p3x)**2+(p1y-p3y)**2)
sorteddist = sorted([dis13,dis12,dis23])
mindist = sorteddist[0]
totalsides = 1
for dis in sorteddist[1:]:
    if (abs(dis-mindist)<=0.00001):
        totalsides += 1
        continue
    q = int(dis/mindist)+1
    totalsides += q
theta = pi/totalsides
h = 0.5*mindist/tan(theta)
s = 0.5*mindist*h*totalsides
print (s)

from sys import stdin,stdout
import math
import fractions
coordinate1=[float(x)for x in stdin.readline().rstrip().split()]
coordinate2=[float(x)for x in stdin.readline().rstrip().split()]
coordinate3=[float(x)for x in stdin.readline().rstrip().split()]
mid1x=(coordinate1[0]+coordinate2[0])/2
mid2x=(coordinate1[0]+coordinate3[0])/2
mid1y=(coordinate1[1]+coordinate2[1])/2
mid2y=(coordinate1[1]+coordinate3[1])/2
diff=(coordinate2[0]-coordinate3[0])/2
if coordinate1[1]!=coordinate2[1] and coordinate1[1]!=coordinate3[1]:
  slope1=(coordinate1[0]-coordinate2[0])/(coordinate2[1]-coordinate1[1])
  slope2=(coordinate1[0]-coordinate3[0])/(coordinate3[1]-coordinate1[1])
  centerx=((coordinate3[1]-coordinate2[1])/2+slope1*mid1x-slope2*mid2x)/(slope1-slope2)
  centery=slope1*(centerx-mid1x)+mid1y
if coordinate1[1]==coordinate2[1]:
  slope2=(coordinate1[0]-coordinate3[0])/(coordinate3[1]-coordinate1[1])
  centerx=mid1x
  centery=slope2*diff+(coordinate1[1]+coordinate3[1])/2
if coordinate1[1]==coordinate3[1]:
  slope1=(coordinate1[0]-coordinate2[0])/(coordinate2[1]-coordinate1[1])
  centerx=mid2x
  centery=slope1*diff*(-1)+mid1y
angle1=math.pi-2*math.atan2(math.hypot(centerx-mid1x,centery-mid1y),math.hypot(coordinate1[0]-coordinate2[0],coordinate1[1]-coordinate2[1])/2)
angle2=math.pi-2*math.atan2(math.hypot(centerx-mid2x,centery-mid2y),math.hypot(coordinate1[0]-coordinate3[0],coordinate1[1]-coordinate3[1])/2)
angle1=fractions.gcd(angle1,angle2)
angle2=angle1/2
radius=math.hypot(coordinate1[0]-centerx,coordinate1[1]-centery)
stdout.write(str(radius*math.sin(angle2)*radius*math.cos(angle2)*2*math.pi/angle1)+'\n')

from math import atan2, sin, sqrt, pi

def create_line(segment):
    line = {}

    line['A'] = segment['q']['y'] - segment['p']['y']
    line['B'] = segment['p']['x'] - segment['q']['x']
    line['C'] = line['A'] * segment['p']['x'] - line['B'] * segment['p']['y']

    return line

def midpoint(segment):
    point = {}

    point['x'] = .5 * (segment['p']['x'] + segment['q']['x'])
    point['y'] = .5 * (segment['p']['y'] + segment['q']['y'])

    return point

def perpendicular(line, point):
    new_line = {}

    new_line['A'] = -line['B']
    new_line['B'] = line['A']
    new_line['C'] = new_line['A'] * point['x'] + new_line['B'] * point['y']

    return new_line

def intersection(line1, line2):
    point = {}

    det = line1['A'] * line2['B'] - line2['A'] * line1['B']
    point['x'] = (line2['B'] * line1['C'] - line1['B'] * line2['C']) / det
    point['y'] = (line1['A'] * line2['C'] - line2['A'] * line1['C']) / det

    return point

def subtract(p, q):
    point = {}

    point['x'] = p['x'] - q['x']
    point['y'] = p['y'] - q['y']

    return point

def distance(p, q):
    d = subtract(p, q)
    return sqrt(d['x']**2 + d['y']**2)

EPS = 1e-9

p = dict((r, c)    for r, c in zip("xy", map(float, raw_input().split())))
q = dict((r, c)    for r, c in zip("xy", map(float, raw_input().split())))
s = dict((r, c)    for r, c in zip("xy", map(float, raw_input().split())))

pq = {'p': p, 'q': q}
ps = {'p': p, 'q': s}

l1 = create_line(pq)
l2 = create_line(ps)

m1 = midpoint(pq)
m2 = midpoint(ps)

pl1 = perpendicular(l1, m1)
pl2 = perpendicular(l2, m2)

c = intersection(pl1, pl2)
r = distance(p, c)

p = subtract(p, c)
q = subtract(q, c)
s = subtract(s, c)

t1, t2, t3 = sorted((atan2(p['y'], p['x']), atan2(q['y'], q['x']), atan2(s['y'], s['x'])))

t12 = t2 - t1
t23 = t3 - t2
t31 = 2 * pi + t1 - t3

for sides in range(3, 200):
    t = 2 * pi / sides

    if abs(t12 / t - round(t12 / t)) < EPS \
       and abs(t23 / t - round(t23 / t)) < EPS \
       and abs(t31 / t - round(t31 / t)) < EPS:
        break

print .5 * sides * r**2 * sin(t)

# python 2.7 code for P001C
# steps:
# 1) get the center and radius
# 2) get the angle and n
# 3) get the area
#https://stackoverflow.com/questions/35176451/python-code-to-calcualte-angle-between-three-point-using-thier-3d-coordinates
#http://www.it610.com/article/5541237.htm
import math

def distance(point_a, point_b):
	x_1, y_1 = point_a
	x_2, y_2 = point_b
	dist = math.sqrt((x_1 - x_2)**2 + (y_1 - y_2)**2)
	return dist

def tri_area(l_a, l_b, l_c): #Heron's formula
	p = (l_a + l_b + l_c) / 2.0
	area = math.sqrt(p * (p-l_a) * (p-l_b) * (p-l_c))
	return area

def find_center(p_a, p_b, p_c): #find the coordinates of the center of the polygon/circumcircle
	x1, y1 = p_a
	x2, y2 = p_b
	x3, y3 = p_c

	x0 = ((y2-y1)*(y3*y3-y1*y1+x3*x3-x1*x1)-(y3-y1)*(y2*y2-y1*y1+x2*x2-x1*x1))/(2.0*((x3-x1)*(y2-y1)-(x2-x1)*(y3-y1)))
	y0 = ((x2-x1)*(x3*x3-x1*x1+y3*y3-y1*y1)-(x3-x1)*(x2*x2-x1*x1+y2*y2-y1*y1))/(2.0*((y3-y1)*(x2-x1)-(y2-y1)*(x3-x1)))
	r = math.sqrt((x1-x0)*(x1-x0)+(y1-y0)*(y1-y0))

	return [x0, y0, r]

def center_angle(center, p_a, p_b):
	x0, y0 = center
	x1, y1 = p_a
	x2, y2 = p_b

	a = distance(p_a, p_b)
	b = distance(center, p_a)
	c = distance(center, p_b)
	cos_X = 1.0 * (b*b + c*c - a*a) / (2*b*c)
	ang = math.acos(cos_X)
	return ang

def gcd(num1, num2):
	err = 0.000001
	while abs(num1 - num2) >= err:
		if num1 > num2 + err:
			num1 -= num2
		elif num2 > num1 + err:
			num2 -= num1
	return max(num1, num2)

if __name__ == '__main__':

	err = 0.000001

	P_1 = raw_input()
	P_2 = raw_input()
	P_3 = raw_input()

	p1 = [float(x) for x in P_1.split(' ')]
	p2 = [float(x) for x in P_2.split(' ')]
	p3 = [float(x) for x in P_3.split(' ')]

	#c = find_center(p1, p2, p3)[0:2]
	r = find_center(p1, p2, p3)[2]
	dis_list = [distance(p1, p2), distance(p2, p3), distance(p3, p1)]
	l_min = min(dis_list)
	l_max = max(dis_list)
	l_mid = 0
	for x in dis_list:
		if not x == l_min and not x == l_max:
			l_mid = x

	cos_ang_min = (r*r + r*r - l_min*l_min) / (2.0 * r * r)
	cos_ang_max = (r*r + r*r - l_max*l_max) / (2.0 * r * r)
	cos_ang_mid = (r*r + r*r - l_mid*l_mid) / (2.0 * r * r)
	ang_min = math.acos(cos_ang_min)
	ang_max = math.acos(cos_ang_max)
	ang_mid = math.acos(cos_ang_mid)

	a0 = ang_min
	if ang_max - ang_min < err:
		a1 = a0
	else:
		a1 = ang_max - ang_min
	a2 = 2.0 * math.pi - a1 - a0
	a3 = ang_max

	g1 = gcd(gcd(a2, a0), a1)
	g2 = gcd(gcd(a3, a0), a1)

	n1 = 2.0 * math.pi / g1
	n2 = 2.0 * math.pi / g2

	if math.fmod(n2,1) < 0.01 and n2 < n1:
		n = n2
		g = g2
	else:
		n = n1
		g = g1

	# i = dis_list.index(min(dis_list))
	# p_c1 = eval('p'+str(i+1))
	# p_c2 = eval('p'+str((i+1)%3 + 1))

	#half_unit_ang = math.asin((s/2.0)/r)
	#unit_area = tri_area(r, r, s)
	#n = round(2.0 * math.pi / center_angle(c, p_c1, p_c2))

	#total_area = n * unit_area
	total_area = 0.5*n*r*r*math.sin(g)

	print total_area

import math
import cmath
import sys

class Segment:
    def __init__(self,bgn,end):
        self.bgn = bgn
        self.end = end

class Circle:
    def __init__(self,p,r):
        self.p = p
        self.r = r

def cross(a,b):
    return (a.conjugate()*b).imag;

def rotate(p):
    return complex(-p.imag,p.real)

def calcCircle(a,b,c):
    mid1 = (a+b)/2.0;
    mid2 = (a+c)/2.0;
    s1 = Segment(mid1,mid1+rotate(b-a))
    s2 = Segment(mid2,mid2+rotate(c-a))
    center = calcIntersect(s1,s2)
    return Circle(center,abs(a-center))

def calcIntersect(a,b):
    d1 = (a.end-a.bgn)
    d2 = (b.end-b.bgn)
    return a.bgn + d1*cross(b.bgn-a.bgn,d2)/cross(d1,d2);

def read():
    v = map(float,sys.stdin.read().split())
    return complex(v[0],v[1]),complex(v[2],v[3]),complex(v[4],v[5])

def isInteger(n):
    return abs(n-round(n))<1e-3

def work((a,b,c)):
    b,c = c,b
    circle = calcCircle(a,b,c)

    angle1 = cmath.phase((a-circle.p)/(b-circle.p))
    angle2 = cmath.phase((b-circle.p)/(c-circle.p))
    angle3 = cmath.phase((c-circle.p)/(a-circle.p))

    angle1,angle2,angle3 = sorted((angle1,angle2,angle3))

    if angle1<0 and angle2<0:
        angle3 -= cmath.pi*2
        angle1 *= -1
        angle2 *= -1
        angle3 *= -1
    else:
        angle1 += cmath.pi*2

    angle1,angle2,angle3 = sorted((angle1,angle2,angle3))

    for i in range(1,101):
        theta = angle1/i
        if isInteger(angle2/theta) and isInteger(angle3/theta):
            print "%.8lf"%(math.sin(theta)*circle.r*circle.r/2*(2*math.pi/theta))
            break

work(read())

import math
from sys import stdin

def get_length(p1, p2):
    return math.sqrt(math.pow(p1[0] - p2[0], 2) + math.pow(p1[1] - p2[1], 2))

def get_angle(p1, p2, p3):
    return math.acos((
                             math.pow(get_length(p1, p2), 2) +
                             math.pow(get_length(p1, p3), 2) -
                             math.pow(get_length(p2, p3), 2)
                     )
                     /
                     (2 * get_length(p1, p2) * get_length(p1, p3))
                     )

def get_radius(p1, p2, p3):
    a, b, c = get_length(p1, p2), get_length(p2, p3), get_length(p1, p3)
    s = (a + b + c) / 2
    area = math.sqrt(s * (s - a) * (s - b) * (s - c))
    return a * b * c / 4 / area

def gcd(x, y):
    while y > 0.00000000001:
        x, y = y, x % y
    return x

def main():
    x1, y1 = map(float, stdin.readline().strip().split())
    p1 = (x1, y1)
    x2, y2 = map(float, stdin.readline().strip().split())
    p2 = (x2, y2)
    x3, y3 = map(float, stdin.readline().strip().split())
    p3 = (x3, y3)
    A = get_angle(p1, p2, p3)
    B = get_angle(p2, p1, p3)
    C = get_angle(p3, p1, p2)
    radius = get_radius(p1, p2, p3)
    n = math.pi / gcd(gcd(A, B), C)
    area = n / 2 * math.pow(radius, 2) * math.sin(2 * math.pi / n)
    print(area)

if __name__ == "__main__":
    main()

import math

def Phi(p):
    delta_y = p[1]-Cy
    delta_x = p[0]-Cx

    if (delta_x >= 0):
        if (delta_y >= 0):
            return math.asin(delta_y/r)
        else:
            return math.asin(delta_y/r) + 2*math.pi
    else:
        return math.pi - math.asin(delta_y/r)

def isPhiinList(phi,philist):
    for n in philist:
        if (math.fabs(n-phi) < 1E-7):
            return 1
    return 0

n0 = map(float, raw_input().split())
n1 = map(float, raw_input().split())
n2 = map(float, raw_input().split())

u = (n0[0]**2+n0[1]**2 - n1[0]**2 - n1[1]**2)/2
v = (n0[0]**2+n0[1]**2 - n2[0]**2 - n2[1]**2)/2

Cx = (u*(n0[1]-n2[1]) - v*(n0[1]-n1[1])) / ((n0[1]-n2[1])*(n0[0]-n1[0]) - (n0[1]-n1[1])*(n0[0]-n2[0]))

if (n0[1] - n1[1] != 0):
    Cy = (u - (n0[0]-n1[0])*Cx) / (n0[1]-n1[1])
else:
    Cy = (v - (n0[0]-n2[0])*Cx) / (n0[1]-n2[1])

r = math.sqrt((n0[0]-Cx)**2 + (n0[1]-Cy)**2)

phi0 = Phi(n0)
phi1 = Phi(n1)
phi2 = Phi(n2)

for columns in range(3,101):
    phi_columns = []
    delta_phi = 2*math.pi/columns
    for i in range(1, columns):
        phi = phi0 + i*delta_phi
        if (phi >= 2*math.pi):
            phi -= 2*math.pi
        phi_columns.append(phi)
    if (isPhiinList(phi1, phi_columns) == 1):
        break

A = columns*r**2/2*math.sin(2*math.pi/columns)
print A

one = map(float, raw_input().split())
two = map(float, raw_input().split())
three = map(float, raw_input().split())
v1 = [x-y for x,y in zip(one, two)]
v2 = [x-y for x,y in zip(one, three)]
print abs(v1[0] * v2[1] - v1[1] * v2[0])

'''
Created on Apr 23, 2017

@author:  Maiko
'''
#!/usr/bin/python
# -*- coding: utf-8 -*-

import math
import fractions

def solve():
    rawin = []
    for i in range(3):
        a = input().split()
        rawin.append( [ float(a[0]), float(a[1]) ] )

    # length of three edges
    a = distance(rawin[0], rawin[1])
    b = distance(rawin[1], rawin[2])
    c = distance(rawin[0], rawin[2])
    p = (a + b + c) / 2
    # square of the triangle
    S = math.sqrt(p * (p-a) * (p-b) * (p-c))

    # Radius of the Circumscribed circle
    R = (a*b*c) / (4*S)

    #Law of cosines
    angle = []
    angle.append(2 * math.asin(a / (2 * R)))
    angle.append(2 * math.asin(b / (2 * R)))
    angle.append(2*math.pi - angle[0] - angle[1])
    # when least edge the
    A = fgcd(angle[0], fgcd(angle[1], angle[2]))
    # number of edge of the polygon
    N = int(2 * math.pi / A)
    S_an = R * R * math.sin(A) * N /  2
    print("%.8lf\n" % S_an)

def distance(a, b):
    return math.sqrt(math.pow(a[0]-b[0], 2)+math.pow(a[1]-b[1], 2))

def feq(a, b):
    return math.fabs(a - b) < 0.01

def fgcd(a, b):
    if feq(a, 0):
        return b
    if feq(b, 0):
        return a
    return fgcd(b, math.fmod(a, b))

if __name__ == '__main__':
    solve()

from math import *

class Point:
    def __init__(self, x, y):
        self.x = x
        self.y = y
    def __repr__(self):
        return '%f %f'%(self.x, self.y)

# y = ax + b
class Line:
    def __init__(self, a, b):
        self.a = a
        self.b = b
    def __repr__(self):
        return '(a %f b %f)'%(self.a, self.b)

def ccw(p1, p2, p3):
    d = (p2.x-p1.x)*(p3.y-p1.y) - (p2.y-p1.y)*(p3.x-p1.x)
    if fabs(d) < 0.001:
        return 0
    elif d > 0:
        return 1
    elif d < 0:
        return -1

def perpline(p1, p2):
    mp = Point((p1.x+p2.x)/2, (p1.y+p2.y)/2)
    a = (p2.y-p1.y)/(p2.x-p1.x)
    b = p1.y-p1.x*a
    if a == 0:
        return Line(inf, mp.x)
    else:
        return Line(-1/a, mp.x/a+mp.y)

def crosspoint(l1, l2):
    if l1.a == inf:
        x = l1.b
        y = l2.a * x  + l2.b
    if l2.a == inf:
        x = l2.b
        y = l1.a * x  + l1.b
    else:
        x = (l1.b - l2.b)/(l2.a - l1.a)
        y = l1.a * x  + l1.b
    return(Point(x,y))

def dist(p1,p2):
    return ((p1.x-p2.x)**2 + (p1.y-p2.y)**2)**0.5
    pass

p = []
for i in range(3):
    x, y = map(float, input().split())
    p.append(Point(x, y))

mp = []
for i in range(3):
    mp.append(Point((p[i].x + p[(i+1)%3].x)/2, (p[i].y + p[(i+1)%3].y)/2))

cp = crosspoint(perpline(p[0], p[1]), perpline(p[1], p[2]))

a, b, c = [(p[i].x - cp.x, p[i].y - cp.y) for i in range(3)]
aa, ba, ca = [round(degrees(acos((aa[0]*bb[0] + aa[1]*bb[1])/(hypot(aa[0],aa[1])*hypot(bb[0], bb[1]))))) for aa, bb in [(a,b), (b,c), (c,a)]]
print(aa,ba,ca)
angle = gcd(aa,gcd(ba,gcd(ca,360)))
print(angle)
print(hypot(a[0], a[1])**2*sin(radians(angle))*0.5*360/angle)

import math
dx=10**(-6)
def equal(x,y):
    if(abs(x-y)<=dx):
        return 1
    return 0
l=input().split()
x1=float(l[0])
y1=float(l[1])
l=input().split()
x2=float(l[0])
y2=float(l[1])
l=input().split()
x3=float(l[0])
y3=float(l[1])
d1=math.sqrt((x1-x2)*(x1-x2)+(y1-y2)**2)
d2=math.sqrt((x1-x3)*(x1-x3)+(y1-y3)**2)
d3=math.sqrt((x3-x2)*(x3-x2)+(y3-y2)**2)
ans=10**18
for n in range(105):
    for a in range(1,n):
        for b in range(1,n):
            if(a+b>=n):
                continue
            c=n-(a+b)
            theta=360/n
            R=d1/(2*math.sin(math.radians(theta*a/2)))
            z=d2/(2*math.sin(math.radians(theta*b/2)))
            y=d3/(2*math.sin(math.radians(theta*c/2)))
            if(equal(R,y) and equal(y,z)):
                ans=min(ans,(n*R*R*math.sin(math.radians(theta)))/2)
print(ans)

from math import degrees, acos, sin, radians
from fractions import gcd

x0, y0 = map(float, raw_input().split())
x1, y1 = map(float, raw_input().split())
x2, y2 = map(float, raw_input().split())

c2 = (x1-x0)**2+(y1-y0)**2
a2 = (x1-x2)**2+(y1-y2)**2
b2 = (x0-x2)**2+(y0-y2)**2
R2 = 0

def alpha(a2, b2, c2):
    cosA2 = (b2+c2-a2)**2/(4.0*b2*c2)
    sinA = (1-cosA2)**0.5
    global R2
    R2 = a2/(2.0*(1-cosA2))
    return 2*degrees(acos(sinA))

degree = gcd(gcd(alpha(a2, b2, c2), alpha(b2, c2, a2)), alpha(c2, a2, b2))
area = int(360/degree + 10**-6)*0.5*sin(radians(degree))*R2
print area

from math import *

def cline((x1, y1), (x2, y2)):
    a = x2-x1
    b = y2-y1
    c = -a*(x1+x2)/2.0 - b*(y1+y2)/2.0
    d = sqrt(a**2 + b**2)
    return a/d, b/d, c/d

def intersect((a1, b1, c1), (a2, b2, c2)):
    d = a1*b2-b1*a2
    return (b1*c2-b2*c1)/d, (a2*c1-a1*c2)/d

def rot((x, y), (cx, cy), a):
    x, y = x-cx, y-cy
    return (cx + x*cos(a) - y*sin(a), cy + x*sin(a) + y*cos(a))

def pt_in((x, y), pts):
    return any([abs(x-a)+abs(y-b) < 1.0e-7 for (a, b) in pts])

def area(pts):
    return abs(sum([(x1+x2)*(y2-y1)/2.0 for (x1, y1), (x2, y2) in zip(pts, pts[1:] + [pts[0]])]))

p1 = map(float, raw_input().split())
p2 = map(float, raw_input().split())
p3 = map(float, raw_input().split())

pc = intersect(cline(p1, p2), cline(p3, p2))

for n in xrange(3, 101):
    pts = [rot(p1, pc, i*2.0*pi/n) for i in xrange(n)]
    if pt_in(p1, pts) and pt_in(p2, pts) and pt_in(p3, pts):
        print area(pts)
        break

#coding=utf-8

from math import *
def read_x_y():
    return map(float, raw_input().split())

x = []
y = []

for i in range(3):
    a,b=read_x_y()
    x.append(a)
    y.append(b)
#print x,y

l=[sqrt((x[i]-x[i-1])**2+(y[i]-y[i-1])**2) for i in range(3)]
t=[acos((l[i-2]**2+l[i-1]**2-l[i]**2)/2.0/l[i-2]/l[i-1]) for i in range(3)]

#print "t:",t

R=l[0]/2./sin(t[0])

#print "R:",R

def gcd_float(a,b):
    if b < 0.00000001:
        return a
    return gcd_float(b, fmod(a,b))

def lcm_float(a,b):
    return a*b/gcd_float(a,b)

a = reduce(gcd_float, t)
S = R*R*sin(a)*cos(a)*pi/a
print "%.6f"%S

#  -coding: utf-8 -*-
import math
class Solution():
    def ancientBerlandCircus(self,x1,y1,x2,y2,x3,y3):
        d1 = math.sqrt(pow(x1-x2,2)+pow(y1-y2,2))
        d2 = math.sqrt(pow(x1-x3,2)+pow(y1-y3,2))
        d3 = math.sqrt(pow(x2-x3,2)+pow(y2-y3,2))
        p = (d1+d2+d3)/2
        s = math.sqrt(p*(p-d1)*(p-d2)*(p-d3))
        r = d1*d2*d3/4/s
        fal1 = math.acos(1-d1*d1/(2*r*r))
        fal3 = math.acos(1-d3*d3/(2*r*r))
        fal2 = 2*math.pi-fal1-fal3
        angle = self.fgcd(fal3,self.fgcd(fal1,fal2))
        mins = r*r/2*(2*math.pi/angle)*math.sin(angle)
        print '%.06f' % mins

    def fgcd(self,x,y):
        if x<1e-4:
            return y
        return self.fgcd(math.fmod(y,x),x)

x1,y1 = raw_input().split()
x2,y2 = raw_input().split()
x3,y3 = raw_input().split()
x1 = round(float(x1), 6)
y1 = round(float(y1), 6)
x2 = round(float(x2), 6)
y2 = round(float(y2), 6)
x3 = round(float(x3), 6)
y3 = round(float(y3), 6)
s = Solution()
s.ancientBerlandCircus(x1,y1,x2,y2,x3,y3)

from math import acos
from math import pi
from math import sin
from math import cos
def angle(a, b, c):
    cs = (a**2+b**2-c**2)/(2*a*b)
    if cs>1: cs = 1
    if cs<-1: cs = -1
    return acos(cs)
def length(xs, ys):
    return ((xs[0]-xs[1]) ** 2 + (ys[0]-ys[1]) ** 2) ** 0.5
xs=[]
ys=[]
for i in range(0, 3):
    x, y = [float(x) for x in input().split()]
    xs.append(x)
    ys.append(y)
abc = [length((xs[i],xs[(i+1)%3]), (ys[i],ys[(i+1)%3])) for i in range(3)]
angles = [angle(abc[i], abc[(i+1)%3], abc[(i+2)%3]) for i in range(3)]
for i in range(3, 101):
    est_angle = pi/i
    flag = True
    for angle in angles:
        d = round(angle/est_angle)
        if (d==0 or abs(est_angle*d-angle)>0.00000001):
            flag = False
            break
    if (flag):
        break
print(i*sin(2*pi/i)*abc[2]**2/sin(angles[0])**2/8)

import math

array, newarray = [], [0]*3

for x in range(3):
  n = input().split()
  m = list(map(float, n))
  array.append(m)

def magn_sq(point):
  return (point[0]**2 + point[1]**2)

def dist_sq(point1, point2):
  return magn_sq([point1[0] - point2[0], point1[1] - point2[1]])

def circumcenter(point1, point2, point3):
  point_1 = [point1[0] - point3[0], point1[1] - point3[1]]
  point_2 = [point2[0] - point3[0], point2[1] - point3[1]]
  const = 2*(point_1[0]*point_2[1] - point_1[1]*point_2[0])
  xcoord = (point_2[1]*magn_sq(point_1) - point_1[1]*(magn_sq(point_2)))/const
  ycoord = (point_1[0]*magn_sq(point_2) - point_2[0]*(magn_sq(point_1)))/const
  return [xcoord, ycoord]

center = circumcenter(array[0], array[1], array[2])

#center is way off

for x in array:
  x[0] = x[0] - center[0]
  x[1] = x[1] - center[1]

radius = math.sqrt(magn_sq(array[0]))

for x in range(3):
  newarray[x] = math.sqrt(dist_sq(array[x], array[(x+1)%3]))

def distToAngle(p):
  r = math.pi/(math.asin(p/(2*radius)))
  return int(round(r, 0))

newarray = list(map(distToAngle, newarray))

def lcm(a, b):
  for i in range(1, b):
    if a*i%b == 0:
      return a*i
  return a*b

numsides = lcm(lcm(newarray[0],newarray[1]),newarray[2])

area = 0.5*numsides*(radius**2)*math.sin(2*math.pi/numsides)

print(area)

from math import sqrt, acos, pi, sin

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

    def dot(self, other):
        return self.x * other.x + self.y * other.y

    def __add__(self, other):
        return Point(self.x + other.x, self.y + other.y)

    def __sub__(self, other):
        return Point(self.x - other.x, self.y - other.y)

    def __mul__(self, other):
        # Multiply by number
        return Point(self.x * other, self.y * other)

    def __str__(self):
        return "{%.2f, %.2f}" % (self.x, self.y, )

    def __abs__(self):
        return sqrt(self.x ** 2 + self.y ** 2)

class Line:
    '''
    Build line from coefficients A, B, C of its equation "Ax + By + C = 0"
    '''
    def __init__(self, a, b, c):
        self.a = a
        self.b = b
        self.c = c

    '''
    Build line from two points on it
    '''
    @staticmethod
    def from_points(p1, p2):
        a = p1.y - p2.y
        b = p2.x - p1.x

        return Line._from_vector_and_point((a, b, ), p1)

    '''
    Build line from direction vector and point on the line
    '''
    @staticmethod
    def _from_vector_and_point((vx, vy, ), p):
        return Line(vx, vy, - vx * p.x - vy * p.y)

    '''
    Returns vertor perpendicular to the given one (s.t. their dot product is zero)
    '''
    @staticmethod
    def _perp_vector(a, b):
        if b == 0:
            return 0.0, 1.0
        else:
            b_new = - 1.0 * a / b

            return 1.0, b_new

    '''
    Returns a line perpendicular to the current one that goes through point `p`
    '''
    def get_perp(self, p):
        a_new, b_new = self._perp_vector(self.a, self.b)

        return Line._from_vector_and_point((a_new, b_new, ), p)

    '''
    Returns the determinant the following matrix:
    [ `a00` `a01` ]
    [ `a10` `a11` ]
    '''
    @staticmethod
    def _det(a00, a01, a10, a11):
        return a00 * a11 - a01 * a10

    '''
    Returns the intersection point between the current line and `other`
    '''
    def intersect_with(self, other):
        delta = self._det(self.a, self.b, other.a, other.b)

        if delta == 0.0:
            raise Exception("ne peresekayutsia")

        x = - self._det(self.c, self.b, other.c, other.b) / delta
        y = - self._det(self.a, self.c, other.a, other.c) / delta

        return Point(x, y)

    def __str__(self):
        return "%.2fx + %.2fy + %.2f == 0" % (self.a, self.b, self.c, )

def midpoint(p1, p2):
    return (p1 + p2) * 0.5

# Returns radian measure of angle AOB, measured clockwise
def angle(a, o, b):
    oa = a - o
    ob = b - o

    cos_phi = 1.0 * oa.dot(ob) / abs(oa) / abs(ob)

    if cos_phi < -1.0:
        cos_phi = -1.0
    elif cos_phi > 1.0:
        cos_phi = 1.0

    phi = acos(cos_phi)

    if oa.y * ob.x - oa.x * ob.y < 0: # `ob` is counterclockwise to `oa`
        return 2.0 * pi - phi
    else:
        return phi

# Returns where it is possible for a `num-sides`-sided regular polygon to have some vertices at angles `alpha` and
# `beta` between each other
def regular_polygon_possible(num_vertices, alpha, beta):
    if alpha > beta:
        alpha, beta = beta, alpha

    enc = 0

    for i in xrange(1, num_vertices):
        for phi in (alpha, beta, ):
            if abs(phi - i * 2.0 * pi / num_vertices) < 2.0 * pi / 200:
                enc += 1

    return enc == 2

def regular_polygon_area(r_big, num_vertices):
    return num_vertices / 2.0 * r_big ** 2 * sin(2.0 * pi / num_vertices)

ps = []

for i in [1, 2, 3]:
    x, y = map(float, raw_input().split(' '))

    ps.append(Point(x, y))

l1 = Line.from_points(ps[0], ps[1])
l2 = Line.from_points(ps[1], ps[2])

m1 = midpoint(ps[0], ps[1])
m2 = midpoint(ps[1], ps[2])

center = l1.get_perp(m1).intersect_with(l2.get_perp(m2))

alpha = angle(ps[0], center, ps[1])
beta =  angle(ps[0], center, ps[2])

num_vertices = None

for i in xrange(3, 100 + 1):
    if regular_polygon_possible(i, alpha, beta):
        num_vertices = i
        break

print regular_polygon_area(abs(ps[0] - center), num_vertices)

from math import pi, sqrt, tan, acos

x1, y1 = map(float, input().split(' '))
x2, y2 = map(float, input().split(' '))
x3, y3 = map(float, input().split(' '))

s1 = sqrt((x1 - x2) ** 2 + (y1 - y2) ** 2)
s2 = sqrt((x1 - x3) ** 2 + (y1 - y3) ** 2)
s3 = sqrt((x2 - x3) ** 2 + (y2 - y3) ** 2)

angle1 = acos((s1 ** 2 + s2 ** 2 - s3 ** 2) / (2 * s1 * s2))
angle2 = acos((s1 ** 2 + s3 ** 2 - s2 ** 2) / (2 * s1 * s3))
angle3 = pi - angle1 - angle2

if max(angle1, angle2, angle3) == angle1:
    N = round(2 * pi / (pi - angle1))
    S = s1 ** 2 * tan(angle1 / 2) / 4
    S *= N
elif max(angle1, angle2, angle3) == angle2:
    N = round(2 * pi / (pi - angle2))
    S = s3 ** 2 * tan(angle2 / 2) / 4
    S *= N
else:
    N = round(2 * pi / (pi - angle3))
    S = s2 ** 2 * tan(angle3 / 2) / 4
    S *= N

print(f"{S:.6f}")

from itertools import *
from math import *

def mid_line((x1, y1), (x2, y2)):
    return x2-x1, y2-y1, (x1**2 - x2**2 + y1**2 - y2**2)/2.0

def intersect((a1, b1, c1), (a2, b2, c2)):
    d = a1*b2-b1*a2
    return (b1*c2-b2*c1)/d, (a2*c1-a1*c2)/d

def vect((x0, y0), (x1, y1)):
    return x1-x0, y1-y0

def dot((a1, b1), (a2, b2)):
    return a1*a2+b1*b2

def length(a):
    return sqrt(dot(a, a))

def angle(c, p1, p2):
    a, b = vect(p1, c), vect(p2, c)
    return acos(dot(a, b) / (length(a) * length(b) + 1.0e-7))

def gcd(a, b):
    while abs(b) > 1.0e-7:
        b, a = fmod(a, b), b
    return a

p = [map(float, raw_input().split()) for i in xrange(3)]
c = intersect(mid_line(p[0], p[1]), mid_line(p[2], p[1]))
t = reduce(gcd, [angle(c, p1, p2) for p1, p2 in combinations(p, 2)])
R = length(vect(p[0], c))
print R**2*pi/t*sin(t)

#coding=utf-8
'''
@brief
有一个圆形的斗兽场，圆上有X个树桩，刚好能组成一个正多边形的舞台。但是，有3个树桩不见了。
现在给你这3个树桩的坐标，让你判断这个舞台最小的面积。不会大于100边型。
即：给定三点求最小多边形

@url
http://codeforces.com/problemset/problem/1/C

@solution
1.求面积
海伦公式: p = (a+b+c)/2 s=sqrt(p(p-a)(p-b)(p-c))
2.求半径
r = abc/(4s)
3.求三个圆心角的最大公约数(注意钝角的情况，第三个圆心角需要2pi减去两个较小的圆心角获得)
4.求出最小边数
'''
from math import sqrt,acos,pi,fabs,sin

def main():
    points = []
    sides = []
    radians = []
    for _ in range(3):
        point = [float(i) for i in raw_input().split()]
        points.append(tuple(point))

    for i in range(len(points)):
        for j in range(i+1, len(points)):
            sides.append(distance(points[i], points[j]))

    #边长从小到大
    sides.sort()

    #print 'sides:%s' % sides

    p = sum(sides) / 2
    s = sqrt(p * (p - sides[0]) * (p - sides[1]) * (p - sides[2]))
    r = prod(sides) / (4 * s)

    for i in range(len(sides)):
        if i == len(sides)-1:
            radian = 2*pi - sum(radians)
        else:
            radian = acos(1 - sides[i]**2/(2*r**2))
        radians.append(radian)

    gcradian = fgcd(radians)
    min_area = pi*r*r*sin(gcradian)/gcradian
    print '%.7lf' % min_area

def distance(p, q):
    return sqrt((p[0]-q[0])**2 + (p[1]-q[1])**2)

def prod(iters):
    return reduce(lambda x,y:x*y, iters)

def feq(x, y):
    return True if fabs(x - y) < 1e-6 else False

def fgcd(iters):
    def _fgcd(x, y):
        if feq(x, 0):
            return y
        if feq(y, 0):
            return x
        return _fgcd(y, x%y)
    return reduce(_fgcd, iters)

if __name__ == '__main__':
    main()

# -*- coding:utf-8 -*-
import sys
import math
from decimal import *

getcontext().prec = 100
def gcd(a, b):
    if b > a:
        return gcd(b, a)
    elif math.fabs(b) > 0.00001:

        return gcd(
            b,
            a - math.floor(a/b) * b
        )
    else:
        return a

class Point(object):
    x = None
    y = None
    def __init__(self, *args ):
        if len(args) == 1:
            self.x, self.y = args[0]
        else:
            self.x, self.y = args

    def dist(self, a):
        x = a.x - self.x
        y = a.y - self.y
        return math.sqrt(x*x + y*y)

    def cross(self, a):
        return self.x * a.y - a.x * self.y

    def __sub__(self, other):
        return Point(self.x - other.x, self.y - other.y)

    def area(self, a, b):
        p1 = a - self
        p2 = b - self
        return math.fabs(p1.cross(p2)) / 2.0

    def angle(self, left, right):
        b = self.dist(left)
        c = self.dist(right)
        a = left.dist(right)
        return math.acos(
            (b*b+c*c-a*a) / ( 2.0 * b * c)
        )

def process(fin):

    p1 = Point(list(map(Decimal, fin().split())))
    p2 = Point(list(map(Decimal, fin().split())))
    p3 = Point(list(map(Decimal, fin().split())))

    a = p2.dist(p3)
    b = p3.dist(p1)
    c = p1.dist(p2)
    S = p1.area(p2,p3)
    R = (a*b*c) / (4.0 * S)

    A = p1.angle(p2, p3) * 2.0
    B = p2.angle(p1, p3) * 2.0
    C = p3.angle(p1, p2) * 2.0

    g = gcd( A, gcd(B, C))
    # n = math.floor(2.0 * math.pi / g)
    n = 2.0 * math.pi / g

    result = n * R * R * math.sin(g) / 2.0

    print(result)

if __name__ == '__main__':
    process(sys.stdin.readline)

import math

#三角形三邊: a, b, c
a1, a2 = 76.820252, 66.709341 #0, 1
b1, b2 = 61.392328, 82.684207 #1, 1
c1, c2 = 44.267775, -2.378694 #0, 0
#a1, a2 = input().split()
#b1, b2 = input().split()
#c1, c2 = input().split()

a1, a2 = float(a1), float(a2)
b1, b2 = float(b1), float(b2)
c1, c2 = float(c1), float(c2)

a = ((b1-c1)**2 + (b2-c2)**2) **0.5
b = ((a1-c1)**2 + (a2-c2)**2) **0.5
c = ((a1-b1)**2 + (a2-b2)**2) **0.5

#外接圓半徑: R
cos_A = (b**2+c**2-a**2)/(2*b*c)
sin_A = (1-cos_A**2)**0.5
R = a/(2*sin_A)
#print(R)

#外接圓圓心角
cos_a = (R**2+R**2-a**2)/(2*R*R)
cos_b = (R**2+R**2-b**2)/(2*R*R)
cos_c = (R**2+R**2-c**2)/(2*R*R)

theta_a = math.acos(cos_a)
theta_b = math.acos(cos_b)
theta_c = math.acos(cos_c)
#print(theta_a, theta_b, theta_c)
#print(theta_a / 0.483321946706122, theta_a % 0.483321946706122, round(theta_a / 0.483321946706122,6)- round(theta_a / 0.483321946706122))
#print(theta_b / 0.483321946706122, theta_b % 0.483321946706122, round(theta_b / 0.483321946706122,6)- round(theta_b / 0.483321946706122))
#print(theta_c / 0.483321946706122, theta_c % 0.483321946706122, round(theta_c / 0.483321946706122,6)- round(theta_c / 0.483321946706122))

#多邊形的圓心角
def is_gcd_theta(theta):
	for t in [theta_a, theta_b, theta_c]:
		div = t / theta
		#print(round(div,6), int(div))
		if not round(div,6) == round(div):
			return False
	return True

sides = 3
theta_regular = 2 * math.pi / sides
#for i in range(3, 101):
	#print("Each angle in n-side shape:", i, 2*math.pi/i)
#print("0-idx sides:", sides, theta_c % theta_regular)
while (not is_gcd_theta(theta_regular)) and sides <= 100:
	sides += 1
	theta_regular = 2 * math.pi / sides
	#print("sides:", sides, theta_a % theta_regular)
tri_area = 1/2*R*R*math.sin(theta_regular)
total_area = round(tri_area * sides, 6)

#多邊形三角形: tri_area
#tri_area = 1/2*R*R*math.sin(math.radians(theta_regular))
#print(sides)
print(total_area)

'''
Created on Apr 23, 2017

@author:  Maiko
'''
#!/usr/bin/python
# -*- coding: utf-8 -*-

import math
import fractions

def solve():
    rawin = []
    for i in range(3):
        a = input().split()
        rawin.append( [ float(a[0]), float(a[1]) ] )

    # length of three edges
    a = distance(rawin[0], rawin[1])
    b = distance(rawin[1], rawin[2])
    c = distance(rawin[0], rawin[2])
    p = (a + b + c) / 2
    # square of the triangle
    S = math.sqrt(p * (p-a) * (p-b) * (p-c))

    # Radius of the Circumscribed circle
    R = (a*b*c) / (4*S)

    #Law of cosines
    angle = []
    angle.append(math.acos((1 - a*a / (2*R*R))))
    angle.append(math.acos((1 - b*b / (2*R*R))))
    angle.append(2*math.pi - angle[0] - angle[1])
    # when least edge the
    A = fgcd(angle[0], fgcd(angle[1], angle[2]))
    # number of edge of the polygon
    N = int(2 * math.pi / A)
    S_an = R * R * math.sin(A) * N /  2
    print("%.8f\n" % S_an)

def distance(a, b):
    return math.sqrt(math.pow(a[0]-b[0], 2)+math.pow(a[1]-b[1], 2))

def feq(a, b):
    return math.fabs(a - b) < 0.01

def fgcd(a, b):
    if feq(a, 0):
        return b
    if feq(b, 0):
        return a
    return fgcd(b, a % b)

if __name__ == '__main__':
    solve()

#!/usr/bin/python

import sys
import math

def intersect(x1,y1,x2,y2,x3,y3,x4,y4):
    # : <math>
    # \begin{align}
    # (P_x, P_y)= \bigg(&\frac{(x_1 y_2-y_1 x_2)(x_3-x_4)-(x_1-x_2)(x_3 y_4-y_3 x_4)}{(x_1-x_2)(y_3-y_4)-(y_1-y_2)(x_3-x_4)}, \\
    #          &\frac{(x_1 y_2-y_1 x_2)(y_3-y_4)-(y_1-y_2)(x_3 y_4-y_3 x_4)}{(x_1-x_2)(y_3-y_4)-(y_1-y_2)(x_3-x_4)}\bigg)
    # \end{align}
    # </math>
    x1y2 = x1*y2
    y1x2 = y1*x2
    x3y4 = x3*y4
    y3x4 = y3*x4

    P_x, P_y = (((x1y2 - y1x2) * (x3 - x4) - (x1 - x2) * (x3y4 - y3x4)) /
                   ((x1 - x2) * (y3 - y4) - (y1 - y2) * (x3 - x4)),
                ((x1y2 - y1x2) * (y3 - y4) - (y1 - y2) * (x3y4 - y3x4)) /
                   ((x1 - x2) * (y3 - y4) - (y1 - y2) * (x3 - x4))
               )
    return (P_x, P_y)

p1= [float(v) for v in sys.stdin.readline().split(" ")]
p2=  [float(v) for v in sys.stdin.readline().split(" ")]
p3= [float(v) for v in sys.stdin.readline().split(" ")]

x1 = (p1[0] + p2[0])/2.0
y1 = (p1[1] + p2[1])/2.0

d1x = p1[0]-p2[0]
d1y = p1[1]-p2[1]

x2 = x1+d1y
y2 = y1+d1x

x3 = (p2[0] + p3[0])/2.0
y3 = (p2[1] + p3[1])/2.0

d2x = p2[0]-p3[0]
d2y = p2[1]-p3[1]

x4 = x3 + d2y
y4 = y3 + d2x

centre =  intersect(x1,y1, x2,y2, x3,y3, x4,y4)

def minus(a,b):
    return (a[0]-b[0], a[1]-b[1])

def norm_dot(a,b):
    len_a = math.sqrt(sum([_a**2 for _a in a]))
    len_b = math.sqrt(sum([_b**2 for _b in b]))
    dot = sum([(_a / len_a) * (_b/len_b) for _a,_b in zip(a,b)])
    return dot

def norm(a):
    len_a = math.sqrt(sum([_a**2 for _a in a]))
    return len_a

p1 = minus(p1, centre)
p2 = minus(p2, centre)
p3 = minus(p3, centre)

angle1 = math.fabs(math.asin(norm_dot(p1,p2)))
angle2 = math.fabs(math.asin(norm_dot(p1,p3)))

test_side_count = 3
while True:
    angle = (math.pi*2.0) / float(test_side_count)
    thetas = [angle * i for i in range(test_side_count)]

    a1_d = [math.fabs(math.fabs(angle1) - math.fabs(t)) for t in thetas]
    a2_d = [math.fabs(math.fabs(angle2) - math.fabs(t)) for t in thetas]
    if min(a1_d)<0.00001 and min(a2_d) < 0.00001:
        break

    test_side_count += 1
    if test_side_count >5:
        break

R = norm(p1)

sect_size = (math.pi*R*R /(2.0*math.pi) * angle) - ((R*R)/2.0) * (angle - math.sin(angle))

print "%.7f" % (sect_size * test_side_count)

import math

def dist(a, b):
	return math.sqrt(a*a + b*b)

def area(side, n):
	#n = int(round(-2 / (angle / math.pi - 1)))
	#print n
	return n * side * side / 4 / math.tan(math.pi / n)

def cos_law(a, b, c):
	c_angle = (c*c - a*a - b*b) / (-2 * a * b)
	return math.acos(c_angle)

def gcd(a, b):
	if abs(b) < 0.001: return a
	return gcd(b, a%b)

x1, y1 = raw_input().split(' ')
x2, y2 = raw_input().split(' ')
x3, y3 = raw_input().split(' ')

x1 = float(x1)
y1 = float(y1)
x2 = float(x2)
y2 = float(y2)
x3 = float(x3)
y3 = float(y3)

d1 = dist(x3 - x2, y3 - y2)
d2 = dist(x3 - x1, y3 - y1)
d3 = dist(x2 - x1, y2 - y1)

arr = [d1, d2, d3]
arr.sort()
#print x1, y1
#print x2, y2
#print x3, y3
#print arr
a, b, c = arr
s = (a + b + c) / 2
radius = a*b*c / 4 / math.sqrt(s * (a+b-s) * (a+c-s) * (b+c-s))
angle_a = cos_law(radius, radius, a)
angle_b = cos_law(radius, radius, b)
#angle_c = cos_law(radius, radius, c)
n = int(round(2 * math.pi / gcd(angle_a, 2*math.pi % angle_b)))
#print 'gcd', gcd(angle_a, angle_b) / math.pi * 180

#print angle / math.pi * 180
#print 'radius', radius
#print angle_a / math.pi * 180
#print angle_b / math.pi * 180
#print angle_c / math.pi * 180
#print (angle_a+angle_b+angle_c) / math.pi * 180

print area(2 * radius * math.sin(math.pi / n), n)

from math import acos, sin, sqrt, pi

Ax,Ay=map(float,raw_input().split())
Bx,By=map(float,raw_input().split())
Cx,Cy=map(float,raw_input().split())
a_2=(Bx-Cx)**2+(By-Cy)**2;   a=sqrt(a_2)
b_2=(Ax-Cx)**2+(Ay-Cy)**2;   b=sqrt(b_2)
c_2=(Bx-Ax)**2+(By-Ay)**2;   c=sqrt(c_2)

P=(a+b+c)/2
S=sqrt(P*(P-a)*(P-b)*(P-c))
R=a*b*c/(4*S)
R_2=a_2*b_2*c_2/((a+b+c)*(b+c-a)*(a+b-c)*(a+c-b))

li = [float(x) for x in range(1,101)]

for i in range(3,101):
    if round(acos(1-c_2/(2*R_2))/(2*pi/i) , 3) in li \
    and round(acos(1-a_2/(2*R_2))/(2*pi/i) , 3) in li\
    and round(acos(1-b_2/(2*R_2))/(2*pi/i) , 3) in li :
        break

print i
Sres=i*R_2*sin(2*pi/i)/2
print Sres