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.

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 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.

import Data.Function(on)
import Data.List(sort)
import Data.Maybe(fromMaybe)
import Control.Monad(replicateM)

eps = 1e-5
dist (x1, y1) (x2, y2) = sqrt (on (+) (^2) (x2 - x1) (y2 - y1))
rad a b c = a * b * c / (4 * sqrt(p * (p - a) * (p - b) * (p - c)))
          where p = (a + b + c) / 2

angle ll lr lc = acos ((ll ^ 2 + lr ^ 2 - lc ^ 2) / (2 * ll * lr))

checkAngle :: [Double] -> Integer -> Bool
checkAngle angles n = isValidAngles angles (2 * pi / (fromIntegral n))

isValidAngles :: [Double] -> Double -> Bool
isValidAngles angles part = and (map (\a -> isClose (a / part)) angles)

isClose v = abs (fromIntegral (round v) - v) < eps

getN :: Double -> Double -> Double -> Maybe Integer
getN a b c =  case (take 1 $ filter (checkAngle [a1', a2', a3']) [3..100]) of
                  [] -> Nothing
                  n:_ -> Just n
              where r = rad a b c
                    a1 = angle r r a
                    a2 = angle r r b
                    a3 = angle r r c
                    a1':a2':_ = sort [a1,a2,a3]
                    a3' = 2 * pi - a1' - a2'

getSq p1 p2 p3 = sq n r
                  where sq n r' = (fromIntegral n) * r' * r' * sin (2 * pi / (fromIntegral n)) / 2
                        a = dist p1 p2
                        b = dist p2 p3
                        c = dist p3 p1
                        r = rad a b c
                        n = fromMaybe 0 $ getN a b c

parseP :: String -> (Double, Double)
parseP str =  (x,y)
              where [x, y] = map read (words str)

main :: IO()
main = do
        p1l <- getLine
        p2l <- getLine
        p3l <- getLine
        print $ getSq (parseP p1l) (parseP p2l) (parseP p3l)

import Data.List (sort)
import Text.Printf (printf)
import Control.Monad (replicateM)

newtype Point2 a = Point2 { getPoint2 :: (a, a) } deriving (Eq, Show)
newtype Vector2 a = Vector2 { getVector2 :: (a, a) } deriving (Eq, Show)
type Line2 a = (Point2 a, Vector2 a)
type LineEquation2 a = (a, a, a)

x :: Point2 a -> a
x = fst . getPoint2
y :: Point2 a -> a
y = snd . getPoint2

xv :: Vector2 a -> a
xv = fst . getVector2
yv :: Vector2 a -> a
yv = snd . getVector2

computeEq2 :: (Num a) => Line2 a -> LineEquation2 a
computeEq2 (o, dir) = (a, b, c)
    where a = yv dir
          b = - (xv dir)
          c = -a * (x o) - b * (y o)

perpendicularLine2 :: (Num a) => Line2 a -> Line2 a
perpendicularLine2 (o, dir) = (o, perpendicularDir)
    where perpendicularDir = Vector2 $ (- (yv dir), xv dir)

isParallel2 :: (Eq a, Num a) => Line2 a -> Line2 a -> Bool
isParallel2 (_, dir) (_, dir') = collinear dir dir'

collinear :: (Eq a, Num a) => Vector2 a -> Vector2 a -> Bool
u `collinear` v = u <^> v == 0

(<^>) :: (Num a) => Vector2 a -> Vector2 a -> a
u <^> v = xv u * yv v - yv u * xv v

intersectLines2 :: (Eq a, Fractional a) => Line2 a -> Line2 a -> Maybe (Point2 a)
intersectLines2 l1 l2
    | isParallel2 l1 l2 = Nothing
    | otherwise = Just $ Point2 ((c2 * b1 - c1 * b2) / det, (a2 * c1 - a1 * c2) / det)
    where (a1, b1, c1) = computeEq2 l1
          (a2, b2, c2) = computeEq2 l2
          det = a1 * b2 - a2 * b1

calcCircleCenter :: (Eq a, Fractional a) => (Point2 a) -> (Point2 a) -> (Point2 a) -> Maybe (Point2 a)
calcCircleCenter p1 p2 p3 = intersectLines2 pline1 pline2
    where v1' = Vector2 (x p2 - x p1, y p2 - y p1)
          v2' = Vector2 (x p3 - x p2, y p3 - y p2)
          p1' = Point2 ((x p1 + x p2) / 2, (y p1 + y p2) / 2)
          p2' = Point2 ((x p2 + x p3) / 2, (y p2 + y p3) / 2)
          line1 = (p1', v1')
          line2 = (p2', v2')
          pline1 = perpendicularLine2 line1
          pline2 = perpendicularLine2 line2

calcAngle :: (RealFloat a) => (Point2 a) -> (Point2 a) -> (Point2 a) -> Maybe a
calcAngle c lp rp | ll > eps && lr > eps = Just $ acos $ (ll + lr - lc) / (2 * sqrt (ll * lr))
                  | otherwise = Nothing
                  where eps = 0.0001
                        ll = (x lp - x c) ^ 2 + (y lp - y c) ^ 2
                        lr = (x rp - x c) ^ 2 + (y rp - y c) ^ 2
                        lc = (x lp - x rp) ^ 2 + (y lp - y rp) ^ 2

detDivisor :: (RealFloat a, Integral b) => a -> a -> Maybe b
detDivisor a1 a2 = if (length res > 0) then Just (head res) else Nothing
                    where a3 = 2 * pi - a1 - a2 --the third angle
                          as = [a1, a2, a3]
                          res = map snd $ take 1 $ filter (\(v,_) -> isValid v as) [(2 * pi / (fromIntegral n), n) | n <- [3..100]]

isValid :: (RealFloat a) => a -> [a] -> Bool
isValid part vals = and (map (\v -> isClose (v / part)) vals)

isClose :: (RealFloat a) => a -> Bool
isClose v = abs (fromIntegral (round v) - v) < 0.0001

calcDistance :: (RealFloat a) => (Point2 a) -> (Point2 a) -> a
calcDistance p1 p2 = sqrt((x p1 - x p2) ^ 2 + (y p1 - y p2) ^ 2)

-- Calc everything in the maybe monad
calcSquare :: (RealFloat a, Show a) => (Point2 a) -> (Point2 a) -> (Point2 a) -> Maybe a
calcSquare p1 p2 p3 = do
                        center <- calcCircleCenter p1 p2 p3 -- find the center
                        a1 <- calcAngle center p1 p2 -- find three angles
                        a2 <- calcAngle center p1 p3
                        a3 <- calcAngle center p2 p3
                        let radius = calcDistance center p1
                        let [a1',a2'] = take 2 $ sort [a1,a2,a3]
                        n <- detDivisor a1' a2'
                        return $ radius ^ 2 * (fromIntegral n) * sin (2 * pi / (fromIntegral n)) / 2

testCircleCenter :: Bool
testCircleCenter = let cc = calcCircleCenter (Point2 (0,0)) (Point2 (1,1)) (Point2 (2,0)) in cc == Just (Point2 (1,0))

testCalcSquare :: (RealFloat a, Show a) => Maybe a
testCalcSquare = sq
                 where  p1 = Point2 (0,0)
                        p2 = Point2 (1,1)
                        p3 = Point2 (0,1)
                        sq = calcSquare p1 p2 p3

main :: IO ()
main = replicateM 3 getLine >>= return.map parsePoint >>= (\[p1,p2,p3] -> return $ calcSquare p1 p2 p3) >>=
        (\sq -> case sq of  Just s -> putStrLn $ show s
                            Nothing -> putStrLn "Error")

parsePoint :: (RealFloat a, Read a) => String -> (Point2 a)
parsePoint str =  Point2 (x,y)
                  where [x,y] = map read (words str)

import Data.Function(on)
import Data.List(sort)
import Data.Maybe(fromMaybe)
import Control.Monad(replicateM)

eps = 1e-5
dist (x1, y1) (x2, y2) = sqrt (on (+) (^2) (x2 - x1) (y2 - y1))
rad a b c = a * b * c / (4 * sqrt(p * (p - a) * (p - b) * (p - c)))
          where p = (a + b + c) / 2

angle ll lr lc = acos ((ll ^ 2 + lr ^ 2 - lc ^ 2) / (2 * ll * lr))

checkAngle :: [Double] -> Integer -> Bool
checkAngle angles n = isValidAngles angles (2 * pi / (fromIntegral n))

isValidAngles :: [Double] -> Double -> Bool
isValidAngles angles part = and (map (\a -> isClose (a / part)) angles)

isClose v = abs (fromIntegral (round v) - v) < eps

getN :: Double -> Double -> Double -> Maybe Integer
getN a b c =  case (take 1 $ filter (checkAngle [a1', a2', a3']) [3..100]) of
                  [] -> Nothing
                  n:_ -> Just n
              where r = rad a b c
                    a1 = angle r r a
                    a2 = angle r r b
                    a3 = angle r r c
                    a1':a2':_ = sort [a1,a2,a3]
                    a3' = 2 * pi - a1' - a2'

getSq p1 p2 p3 = sq n r
                  where sq n r' = (fromIntegral n) * r' * r' * sin (2 * pi / (fromIntegral n)) / 2
                        a = dist p1 p2
                        b = dist p2 p3
                        c = dist p3 p1
                        r = rad a b c
                        n = fromMaybe 0 $ getN a b c

getSq' [p1,p2,p3] = getSq p1 p2 p3

parseP :: String -> (Double, Double)
parseP str =  (x,y)
              where [x, y] = map read (words str)

main :: IO()
main = replicateM 3 getLine >>= print . getSq' . map parseP

main = interact $ solve . map (map read . words) . lines
  where
    getCandidates = candidates . getAllCos . getSides
    getSides = map culcLen . combinations
    culcLen ([a, b], [c, d]) = sqrt ((c - a) ^ 2 + (d - b) ^ 2)
    combinations xs = zip xs $ getShift xs
    getShift (x:xs) = xs ++ [x]
    getAllCos [a, b, c] = [getCos [a, b, c], getCos [c, a, b], getCos [b, c, a]]
    getCos [a, b, c] = (a ^ 2 + b ^ 2 - c ^ 2) / (2 * a * b)
    candidates l = [fst ncoss | ncoss <- ncosss, allExist l (snd ncoss)]
    allExist xs coss = all (`exist` coss) xs
    exist x = any $ (\x y -> abs (x - y) < 1e-6) x
    ncosss = [(n, [cos (pi / n * i) | i <- [1 .. n - 2]]) | n <- [3 .. 100]]
    getR x = last (getSides x) / sqrt (2 - 2 * getCosTheta x)
    getCosTheta = (+ (-1)) . (* 2) . (^ 2) . getCos . getSides
    area r n = r * r * sin (2 * pi / n) / 2 * n
    getAreas x = (map $ area $ getR x) (getCandidates x)
    getAns = show . minimum . getAreas
    solve s = (\(x, y) -> x ++ take 7 y) $ span (/= '.') (getAns s)

import Prelude hiding (gcd, div)

gcd :: Double -> Double -> Double
gcd a b
  | b < 0.0001 = a
  | a < b = gcd b a
  | otherwise = gcd (a-b) b

solve :: [[Double]] -> Double
solve ps = 0.5 * n * ls * sin(pi * 2 / n)
  where
    lens i = sum . map (\j -> (ps !! a !! j - ps !! b !! j) ** 2) $ [0..1]
      where (a, b) = (i+1, i+2)
    len = sqrt . lens

    dtmp i = lens (i+1) + lens (i+2) - lens i
    div i = acos $ dtmp i / 2 / len (i+1) / len (i+2)

    n = fromInteger . floor $ pi / foldl1 gcd (map div [0..2])
    ls = 0.25 * lens 2 / (1 - ((0.5 * dtmp 2 / len 0 / len 1) ** 2))

main :: IO ()
main = interact $ show . solve . cycle . map (map read . words) . lines

type MyPoint = (Double, Double)

isIntegral :: Double -> Bool
isIntegral x =  dx <= 1e-5
    where dx = abs (x - fromIntegral (round x))

myLength :: MyPoint -> MyPoint -> Double
myLength p q = sqrt $ dx * dx + dy * dy
    where dx = fst p - fst q
          dy = snd p - snd q

readPoint :: String -> MyPoint
readPoint inStr = ((read pre)::Double, (read suf)::Double)
    where (pre, suf) = break (== ' ') inStr

main = do
  input <- getContents
  let vertice = map readPoint . lines $ input
      a = myLength (last vertice) (head (tail vertice))
      b = myLength (last vertice) (head vertice)
      c = myLength (head vertice) (head (tail vertice))
      angleA = acos ((b * b + c * c - a * a) / (2 * b * c))
      angleB = acos ((a * a + c * c - b * b) / (2 * a * c))
      angleC = acos ((b * b + a * a - c * c) / (2 * a * b))
      p = (a + b + c) / 2
      s = sqrt (p * (p - a) * (p - b) * (p - c))
      r = a * b * c / (4 * s)
      isGoodN n = all isIntegral  (map (/ (pi / fromIntegral n)) [angleA, angleB, angleC])
      areaN n = fromIntegral n * r * r / 2 * sin (2 * pi / fromIntegral n)
      result = minimum (map areaN (filter isGoodN [3..100]))
  putStrLn $ show result

{-
    Find the area of the minimum regular polygon given three random vertices of
        said polygon
-}

dist ( [x0, y0], [x1, y1] ) = sqrt ((x0 - x1)^2 + (y0 - y1)^2)
angle (a,b,c) = acos ( ( c^2 + b^2 - a^2) / 2 / b / c )
isInteger x = abs ( x - fromIntegral (round x) ) <= 10**(-5)

solve [p0,p1,p2] =
    let
        [a,b,c] = map dist [ (p0,p1), (p1,p2), (p2,p0) ]
        [x,y,z] = map angle [ (a,b,c), (b,c,a), (c,a,b) ]
        r = a / 2 / sin x
        ok a = all isInteger $ map (/a) [x,y,z]
        q = 2 * (head $ filter ok $ map (pi/) [3..100])
    in
        r^2 * sin q * pi / q

main = interact $ show . solve . map ( map read . words) . lines

import Control.Monad

data Vector = Vector Double Double
data Point = Point Double Double

eps = 1e-3
instance Eq Point where
	(Point x1 y1) == (Point x2 y2) = (abs (x1 - x2)) < eps && (abs (y1 - y2)) < eps

getPoint = do
	l <- getLine
	let [x, y] = map read (words l)
	return (Point x y)

vector (Point x1 y1) (Point x2 y2) = Vector (x2 - x1) (y2 - y1)
normal (Vector x y) = Vector (-y) x
cross (Vector x1 y1) (Vector x2 y2) = x1*y2 - x2*y1
add' (Point x1 y1) (Vector x2 y2) = Point (x1 + x2) (y1 + y2)
div' (Vector x y) f = Vector (x / f) (y / f)
mul' (Vector x y) f = Vector (x * f) (y * f)
sub' (Point x1 y1) (Point x2 y2) = Point (x1 - x2) (y1 - y2)

rotate (Point x y) a = Point (x * cos a - y * sin a) (x * sin a + y * cos a)

match n ps =
	let p = head ps
	in length (filter (\p -> p `elem` ps) [rotate p (2*pi*i / n) | i <- [0..n-1]]) == length ps

center p1 p2 p3 =
	let
		an = normal (vector p1 p2)
		b = vector p2 p3
		bn = normal b
		c = vector p1 p3
		s = (an `cross` c) / (bn `cross` an)
	in
		p2 `add'` (b `div'` 2) `add'` ((bn `div'` 2) `mul'` s)

main = do
	[p1, p2, p3] <- replicateM 3 getPoint

	let
		p0 = center p1 p2 p3
		-- ps = map (\p -> p `sub'` p0) [p1, p2, p3]
		ps = map (sub' p0) [p1, p2, p3]
		n = head (filter (\n -> match n ps) [3..100])
		rr = x*x + y*y  where Point x y = ps !! 0

	print $ n*rr*sin(2*pi/n) / 2

import Control.Applicative
import Control.Monad
import Data.List
import Data.Ord
import Text.Printf

epsilon :: Double
-- epsilon = 1e-9
epsilon = 1e-4

cross :: [[Double]] -> Double
cross [[y1, x1], [y2, x2], [y3, x3]] = (x2 - x1) * (y3 - y1) - (y2 - y1) * (x3 - x1)

distance :: [Double] -> [Double] -> Double
distance [y1, x1] [y2, x2] = sqrt $ (x2 - x1) ^ 2 + (y2 - y1) ^ 2

cap :: Double -> Double
cap = min 1 . max (negate 1)

unitVector :: [Double] -> [Double] -> [Double]
unitVector p1@[y1, x1] p2@[y2, x2] = cap . (/ d) <$> [x2 - x1, y2 - y1]
 where
  d = distance p1 p2

radian p@[y, x] = if y >= 0 then theta else 2 * pi - theta
 where
  theta = acos x

centerOfCircle :: [[Double]] -> [Double]
centerOfCircle ps@[[y1, x1], [y2, x2], [y3, x3]]
  | abs (cross ps) < epsilon = error $ "All the points are on a line."
  | otherwise                = [b / a, d / c]
 where
  a = 2 * (y1 * (x3 - x2) + y2 * (x1 - x3) + y3 * (x2 - x1))
  b = (y1 ^ 2 + x1 ^ 2) * (x3 - x2)
    + (y2 ^ 2 + x2 ^ 2) * (x1 - x3)
    + (y3 ^ 2 + x3 ^ 2) * (x2 - x1)
  c = 2 * (x1 * (y3 - y2) + x2 * (y1 - y3) + x3 * (y2 - y1))
  d = (y1 ^ 2 + x1 ^ 2) * (y3 - y2)
    + (y2 ^ 2 + x2 ^ 2) * (y1 - y3)
    + (y3 ^ 2 + x3 ^ 2) * (y2 - y1)

solve :: (Double, Int) -> [Double] -> Double
solve = fmap (((2 * pi) /) . fst) . foldl' search
 where
  search (theta, n) x = (theta / fromIntegral (until check succ n), 1)
   where
    check i
      | x `fmod` t < epsilon = True
      | otherwise            = False
     where
      t = theta / fromIntegral i
      v `fmod` d
        | r < epsilon || abs (1 - r) < epsilon = 0
        | otherwise                            = r
       where
        (_, r) = properFraction $ (v / d)

getDouble :: IO [Double]
getDouble = fmap read . words <$> getLine

main = do
  -- let ps = [[0, 0], [1, 1], [0, 1]]
  -- let ps = [[0, 1], [sqrt 3 / 2, 1 / 2], [0, -1]]
  -- let ps = [[0, 1], [sqrt 2 / 2, sqrt 2 / 2], [0, -1]]
  -- let ps = [[0, 1], [1 / 2, sqrt 3 / 2], [0, -1]]
  ps <- replicateM 3 getDouble
  let c  = centerOfCircle ps
  let [theta1, theta2, theta3] = sort $ radian <$> (unitVector c <$> ps)
  let xs = [theta2 - theta1, theta3 - theta2, 2 * pi - (theta3 - theta1)]
  let n = solve (2 * pi, 1) xs
  let r = distance c (head ps)
  printf "%.7f" $ (r ^ 2 * sin (2 * pi / n) / 2) * n

module Main (main) where

import Text.Printf

data Point = Point Double Double
data Line = Line Double Double Double

instance Show Point where
    show (Point x y) = "{" ++ show x ++ ", " ++ show y ++ "}"

instance Show Line where
    show (Line a b c) = "{(" ++ show a ++ ")*x + (" ++ show b ++ ")*y + (" ++ show c ++ ") = 0}"

-- прямая по двум точкам в виде Ax+By+C=0
createLine (Point x1 y1) (Point x2 y2) = (Line a b c) where
    a = y1-y2
    b = x2-x1
    c = x1*y2 - x2*y1

-- серединный перпендикуляр по двум точкам в виде Ax+By+C=0
midLine (Point x1 y1) (Point x2 y2) = (Line (-b) a (b*x0 - a*y0)) where
    a = y1-y2
    b = x2-x1
    x0 = (x2+x1)/2
    y0 = (y2+y1)/2

-- угол между двумя прямыми
angleLines (Line a1 b1 c1) (Line a2 b2 c2) = atan2 (a1*b2 - a2*b1) (a1*a2 + b1*b2)

-- угол между тремя точками (пересекающимися прямыми в первой точке)
anglePoints pCenter p1 p2 = angleLines (createLine pCenter p1) (createLine pCenter p2)

-- пересечение двух прямых
interLines (Line a1 b1 c1) (Line a2 b2 c2) = (Point (dx/dxy) (dy/dxy)) where
    dx = b1*c2 - b2*c1
    dy = c1*a2 - c2*a1
    dxy = a1*b2 - a2*b1

-- расстояние между точками
dist (Point x1 y1) (Point x2 y2) = sqrt (dx*dx + dy*dy) where
    dx = x1-x2
    dy = y1-y2

main = do
    instr <- getContents
    let [p1, p2, p3] = map readPoint $ take 3 $ lines instr
    let center = interLines (midLine p1 p2) (midLine p2 p3)
    printf "%.8f\n" $ squarePoli
                    (dist p1 center)
                    (findMinPoli (anglePoints center p1 p2) (anglePoints center p2 p3)) where

        -- площать многоугольника через радиус и количество углов
        squarePoli :: Double -> Int -> Double
        squarePoli r n = n2 * r*r * (sin (pi/n2)) where
            n2 = (fromIntegral n)/2

        -- сколько углов в минимальном многоугольнике с такими внутренними углами?
        findMinPoli :: Double -> Double -> Int
        findMinPoli a b = findMinPoli' 3 where

            findMinPoli' :: Int -> Int
            findMinPoli' n | n>=100 = 100
            findMinPoli' n = if (nearlyInt (a*n')) && (nearlyInt (b*n'))
                then n
                else findMinPoli' (n+1) where
                    n' = (fromIntegral n)/(pi*2)

            nearlyInt :: Double -> Bool
            nearlyInt d = (abs (d - (fromIntegral (round d)))) < 0.00001

-- input
readDouble :: String -> Double
readDouble = read

readPoint :: String -> Point
readPoint ss = (Point (coords!!0) (coords!!1)) where
    coords = map readDouble $ words ss

import Control.Monad
import Debug.Trace

myTrace :: (Show a) => a -> a
myTrace x = traceShow x x

data Point = Point Double Double
	deriving (Eq, Show)

vmul scalar (Point x y) = Point (scalar * x) (scalar * y)
vadd (Point x1 y1) (Point x2 y2) = Point (x1 + x2) (y1 + y2)
vsub (Point x1 y1) (Point x2 y2) = Point (x1 - x2) (y1 - y2)
vdot (Point x1 y1) (Point x2 y2) = x1 * x2 + y1 * y2
vabs p = distanceBetween p (Point 0 0)

distanceBetween (Point x1 y1) (Point x2 y2) = sqrt $ sqr (x2 - x1) + sqr (y2 - y1)
sqr x = x * x

getPoint = do
	xy <- (liftM words) getLine
	return $ Point (parse (xy !! 0)) (parse (xy !! 1))
	where
		parse :: String -> Double
		parse = read

getInput :: IO (Point, Point, Point)
getInput = do
	a1 <- getPoint
	a2 <- getPoint
	a3 <- getPoint
	return (a1, a2, a3)

triangleArea a1 a2 a3 = sqrt $ p * (p - a) * (p - b) * (p - c)
	where
		a = distanceBetween a2 a3
		b = distanceBetween a1 a3
		c = distanceBetween a1 a2
		p = (a + b + c) / 2

centerOf points@(a1, a2, a3) = (aa `vmul` a1) `vadd` (ab `vmul` a2) `vadd` (ac `vmul` a3)
	where
		aa = (sqr $ distanceBetween a2 a3) / (8 * sqr area) * vdot (a1 `vsub` a2) (a1 `vsub` a3)
		ab = (sqr $ distanceBetween a1 a3) / (8 * sqr area) * vdot (a2 `vsub` a1) (a2 `vsub` a3)
		ac = (sqr $ distanceBetween a1 a2) / (8 * sqr area) * vdot (a3 `vsub` a1) (a3 `vsub` a2)
		area = triangleArea a1 a2 a3

areaOfRegularPolygon :: Int -> Double -> Double
areaOfRegularPolygon n r = (fromIntegral n / 2) * sqr r * sin (2 * pi / fromIntegral n)

getNumberOfSides :: Double -> (Point, Point, Point) -> Int
getNumberOfSides r points@(a1, a2, a3) = n
	where
		(p1, p2, p3, n) = head $ filter almostIntegerTriple omega
		almostIntegerTriple (a, b, c, _) = almostInteger a && almostInteger b && almostInteger c
		almostInteger x = abs x < 0.001
		center = centerOf points
		alpha = normalize $ acos $ (a `vdot` b) / (vabs a * vabs b)
		beta = normalize $ acos $ (b `vdot` c) / (vabs b * vabs c)
		gamma = normalize $ acos $ (c `vdot` a) / (vabs c * vabs a)
		a = a1 `vsub` center
		b = a2 `vsub` center
		c = a3 `vsub` center
		omega = [(sin (fromIntegral i * alpha / 2),
			sin (fromIntegral i * beta / 2),
			sin (fromIntegral i * gamma / 2), i) | i <- [3..]]
		normalize x
			| x < 0 = x + 2 * pi
			| otherwise = x

main = do
	points@(a1, a2, a3) <- getInput
	let center = centerOf points
	let r = distanceBetween a1 center
	let n = getNumberOfSides r points
	print $ areaOfRegularPolygon n r

{-# OPTIONS_GHC -O2 -XNoMonomorphismRestriction #-}
{-# LANGUAGE BangPatterns #-}
{-(c) gorlum0 [at] gmail.com-}
import qualified Data.ByteString.Char8 as BS
import Data.List
import Data.Array
import Data.Char
import Control.Monad
import Debug.Trace (trace)
import Data.Maybe (fromJust)
import Text.Printf (printf)

dist [x1,y1] [x2,y2] = sqrt $ (x1-x2)**2 + (y1-y2)**2

isInteger x = abs (x - (fI . round) x) <= 1e-5

area [p1, p2, p3] = fI n * r*r/2 * sin(2*pi/fI n)
    where
    a = dist p1 p2
    b = dist p2 p3
    c = dist p1 p3
    s = (a+b+c) / 2
    r = a*b*c / 4 / sqrt(s*(s-a)*(s-b)*(s-c))
    alpha = acos $ 1 - 0.5*a**2/r**2
    beta  = acos $ 1 - 0.5*b**2/r**2
    gamma = acos $ 1 - 0.5*c**2/r**2
    fits n = all isInteger $ map (/(2*pi/fI n)) [alpha, beta, gamma]
    (n:_) = filter fits [3..100]

main = do
    ls <- lines `fmap` getContents
    let xss = map (map read . words) ls :: [[Double]]
    forM_ (splitEvery 3 xss) $
        print . area

readNum = fst . fromJust . BS.readInteger
fI = fromIntegral
--- debug = flip trace
traceShow = trace . show
debug = flip traceShow
infixr 1 `debug2`
debug2 x msg = flip trace x (printf "%s: %s" msg $ show x)

infixr 1 ?
True ? x = const x
False ? _ = id

splitEvery _ [] = []
splitEvery n xs = ys : splitEvery n xs'
    where (ys, xs') = splitAt (fI n) xs

{-# OPTIONS_GHC -O2 -XNoMonomorphismRestriction #-}
{-# LANGUAGE BangPatterns #-}
{-(c) gorlum0 [at] gmail.com-}
import qualified Data.ByteString.Char8 as BS
import Data.List
import Data.Array
import Data.Char
import Control.Monad
import Debug.Trace (trace)
import Data.Maybe (fromJust)
import Text.Printf (printf)

dist [x1,y1] [x2,y2] = sqrt $ (x1-x2)**2 + (y1-y2)**2

isInteger x = abs (x - (fI . round) x) <= 1e-5

area [p1, p2, p3] = fI n * r*r/2 * sin(2*pi/fI n)
    where
    a = dist p1 p2
    b = dist p2 p3
    c = dist p1 p3
    s = (a+b+c) / 2
    r = a*b*c / 4 / sqrt(s*(s-a)*(s-b)*(s-c))
    alpha = acos $ 1 - 0.5*a**2/r**2 --`debug2` "alpha"
    beta  = acos $ 1 - 0.5*b**2/r**2 --`debug2` "beta"
    gamma = acos $ 1 - 0.5*c**2/r**2 --`debug2` "gamma"
    fits n = all isInteger $ map (/(2*pi/fI n)) [alpha, beta, gamma]
    (n:_) = filter fits [3..]

main = do
    ls <- lines `fmap` getContents
    let xss = map (map read . words) ls :: [[Double]]
    forM_ (splitEvery 3 xss) $
        print . area

readNum = fst . fromJust . BS.readInteger
fI = fromIntegral
--- debug = flip trace
traceShow = trace . show
debug = flip traceShow
infixr 1 `debug2`
debug2 x msg = flip trace x (printf "%s: %s" msg $ show x)

infixr 1 ?
True ? x = const x
False ? _ = id

splitEvery _ [] = []
splitEvery n xs = ys : splitEvery n xs'
    where (ys, xs') = splitAt (fI n) xs

type Point = (Double, Double)

(~=) :: Double -> Double -> Bool
(~=) x y  =  abs (x-y) < 0.0000001

getN :: Double -> Double -> Double -> Int
getN a b c  =  head [n | n <- [3..100], checkAngle n a, checkAngle n b, checkAngle n c]
  where
    checkAngle :: Int -> Double -> Bool
    checkAngle n a  =  any (\i -> (fromIntegral i / fromIntegral n) ~= (a / (2*pi))) [1..n]

getCentre :: Point -> Point -> Point -> Point
getCentre (ax, ay) (bx, by) (cx, cy)  =  o
  where
    a11  =  by - ay
    a12  =  ay - cy
    a21  =  ax - bx
    a22  =  cx - ax
    b1   =  0.5 * (bx - cx)
    b2   =  0.5 * (by - cy)
    t1   =  -(b1 * a22 - a12 * b2) / (a11 * a22 - a12 * a21)
    o    =  (0.5 * (ax + bx) + t1 * (by - ay),
             0.5 * (ay + by) + t1 * (ax - bx))

getAngle :: Point -> Point -> Double
getAngle (ax, ay) (bx, by)  =  acos (scal / (modA * modB))
  where
    scal  =  ax * bx + ay * by
    modA  =  modP (ax, ay)
    modB  =  modP (bx, by)

getVector :: Point -> Point -> Point
getVector (ax, ay) (bx, by)  =  (bx - ax, by - ay)

modP :: Point -> Double
modP (x, y)  =  sqrt (x*x + y*y)

solve :: Point -> Point -> Point -> Double
solve p1 p2 p3  =  n * r * r * cos a * sin a
  where
    o   =  getCentre p1 p2 p3
    a1  =  getAngle (getVector o p1) (getVector o p2)
    a2  =  getAngle (getVector o p1) (getVector o p3)
    a3  =  getAngle (getVector o p2) (getVector o p3)
    r   =  modP (getVector o p1)
    n   =  fromIntegral (getN a1 a2 a3)
    a   =  2 * pi / (2 * n)

parse :: String -> Point
parse line  =  (x, y)
  where
    [x, y]  =  map read (words line)

readPoint :: IO Point
readPoint  =  getLine >>= return . parse

replicateM :: Monad m => Int -> m a -> m [a]
replicateM n action  =  mapM (const action) [1..n]

main :: IO ()
main  =  do
    [p1, p2, p3] <- replicateM 3 readPoint
    print $ solve p1 p2 p3

-- Codeforces 1C

{-# LANGUAGE MultiWayIf #-}

import qualified Data.ByteString.Char8 as BC
import Data.Fixed (mod')
import Text.Printf

main :: IO ()
main = BC.getContents >>= solve . map (read . BC.unpack) . BC.words >>= printf "%.6f"

solve :: [Double] -> IO Double
solve [x1, y1, x2, y2, x3, y3] = do
    let ab = (x2 - x1, y2 - y1)
        ac = (x3 - x1, y3 - y1)
        bc = (x3 - x2, y3 - y2)
    let r1' = dist ab
        r2' = dist ac
        r3' = dist bc
        r1 = sqrt r1'
        r2 = sqrt r2'
        r3 = sqrt r3'
    let cc = (r1 + r2 + r3) / 2
        ss = sqrt (cc * (cc - r1) * (cc - r2) * (cc - r3)) -- 面积
        r = r1 * r2 * r3 / (4 * ss)                        -- 外接圆外径
    let delta1 = acos (1 - r1' / (2 * r * r))
        delta2 = acos (1 - r2' / (2 * r * r))
        delta3 = 2 * pi - delta1 - delta2
    let delta = fgcd delta1 (fgcd delta2 delta3)           -- 一条边对应的圆心角
        n = fromIntegral . round $ 2 * pi / delta
    return $ 0.5 * r * r * sin (2 * pi / n) * n

  where
    dist (u1, v1) = u1 * u1 + v1 * v1

    fgcd a b | a < 1e-4 = b
             | b < 1e-4 = a
             | otherwise = fgcd b (a `mod'` b)

(⋅) = (*)

𝜋 = pi
𝜀 = 0.0001 -- epsilon. do not set this value too small

𝘥 (𝑥₁, 𝑦₁) (𝑥₂, 𝑦₂) = sqrt $ (𝑥₁ - 𝑥₂)⋅(𝑥₁ - 𝑥₂) + (𝑦₁ - 𝑦₂)⋅(𝑦₁ - 𝑦₂)

𝜃 (𝑥₁, 𝑦₁) (𝑥₂, 𝑦₂) | abs (𝑥₂ - 𝑥₁) < 𝜀 = 𝜋/2
                     | 𝑥₁ > 𝑥₂ = 𝜋 + atan ((𝑦₂ - 𝑦₁)/(𝑥₂ - 𝑥₁))
                     | otherwise = atan ((𝑦₂ - 𝑦₁)/(𝑥₂ - 𝑥₁))

𝛿 (𝑥ᵣ, 𝑦ᵣ) (𝑥₁, 𝑦₁) (𝑥₂, 𝑦₂) = if 𝛾 < 𝜀 then 𝜋 else 𝛾
  where
    𝛾 = abs $ 𝜃 (𝑥ᵣ, 𝑦ᵣ) (𝑥₁, 𝑦₁) - 𝜃 (𝑥ᵣ, 𝑦ᵣ) (𝑥₂, 𝑦₂)

𝘧𝘨𝘤𝘥 𝛼 𝛽 | abs 𝛼 < 𝜀 = 𝛽
         | 𝛼 > 𝛽 = 𝘧𝘨𝘤𝘥 𝛽 𝛼
         | otherwise = 𝘧𝘨𝘤𝘥 (𝛽 - 𝛼) 𝛼

main = do
  -- Read 3 vertices
  line₁ <- getLine
  let 𝑥₁ = read (words line₁ !! 0) :: Double
  let 𝑦₁ = read (words line₁ !! 1) :: Double
  line₂ <- getLine
  let 𝑥₂ = read (words line₂ !! 0) :: Double
  let 𝑦₂ = read (words line₂ !! 1) :: Double
  line₃ <- getLine
  let 𝑥₃ = read (words line₃ !! 0) :: Double
  let 𝑦₃ = read (words line₃ !! 1) :: Double

  -- Find the center (𝑥ᵣ, 𝑦ᵣ)
  let 𝑎₁₂ = 𝑥₁ - 𝑥₂
  let 𝑏₁₂ = 𝑦₁ - 𝑦₂
  let 𝑐₁₂ = (𝑥₁⋅𝑥₁ - 𝑥₂⋅𝑥₂ + 𝑦₁⋅𝑦₁ - 𝑦₂⋅𝑦₂) / 2
  let 𝑎₁₃ = 𝑥₁ - 𝑥₃
  let 𝑏₁₃ = 𝑦₁ - 𝑦₃
  let 𝑐₁₃ = (𝑥₁⋅𝑥₁ - 𝑥₃⋅𝑥₃ + 𝑦₁⋅𝑦₁ - 𝑦₃⋅𝑦₃) / 2
  let 𝑥ᵣ = (𝑏₁₃⋅𝑐₁₂ - 𝑏₁₂⋅𝑐₁₃) / (𝑎₁₂⋅𝑏₁₃ - 𝑎₁₃⋅𝑏₁₂)
  let 𝑦ᵣ = (𝑎₁₂⋅𝑐₁₃ - 𝑎₁₃⋅𝑐₁₂) / (𝑎₁₂⋅𝑏₁₃ - 𝑎₁₃⋅𝑏₁₂)

  -- Determine number of edges 𝑛 and circumradius 𝑟
  let 𝛿₁₂ = 𝛿 (𝑥ᵣ, 𝑦ᵣ) (𝑥₁, 𝑦₁) (𝑥₂, 𝑦₂)
  let 𝛿₁₃ = 𝛿 (𝑥ᵣ, 𝑦ᵣ) (𝑥₁, 𝑦₁) (𝑥₃, 𝑦₃)
  let 𝜂 = 𝘧𝘨𝘤𝘥 (2⋅𝜋) $ 𝘧𝘨𝘤𝘥 𝛿₁₂ 𝛿₁₃
  let 𝑛 = fromInteger $ round (2⋅𝜋/𝜂)
  let 𝑟 = 𝘥 (𝑥ᵣ, 𝑦ᵣ) (𝑥₁, 𝑦₁)
  let 𝒂 = 𝑛⋅𝑟⋅𝑟⋅sin (𝜋/𝑛)⋅cos (𝜋/𝑛)
  print 𝒂

import Data.Array
import Data.Ratio
import Data.Char
import Data.List
import Data.Bits

import System
import System.IO
import System.Random
import Control.Applicative
import Control.Monad
import qualified Data.Set as Set
import qualified Data.Map as Map

import Text.Printf

import Debug.Trace

-- newtype Point = Pt (Double, Double) deriving Show
type Point = (Double, Double) -- (x,y)
type Line = (Double, Double, Double) -- ax+by=c

infixr 6 -.
(-.) (x1, y1) (x2, y2) = (x1 - x2, y1 - y2)

len (x,y) = sqrt(x^2+y^2)
dot (x1, y1) (x2, y2) = x1*x2 + y1*y2
ang v1 v2 = if l1==0 || l2==0 then 0 else acos(cosine)
    where l1 = len v1
          l2 = len v2
          v = dot v1 v2/l1/l2
          cosine | v > 1     =  1.0
                 | v < -1    = -1.0
                 | otherwise =  v

readls :: (Read a) => String -> [a]
readls = map read . words

midLine :: Point -> Point -> Line
midLine (x1, y1) (x2, y2) = let a = y2-y1
                                b = x1-x2
                                c = a*(y1+y2)-b*(x1+x2)
                            in (-2*b, 2*a, c)

isect :: Line -> Line -> Point
isect (a1, b1, c1) (a2, b2, c2) = ((b2*c1-b1*c2)/det, (a1*c2-a2*c1)/det) where det = a1*b2 - a2*b1

-- given 3 point on cirlce, return center of circle
circleCenter :: Point -> Point -> Point -> Point
circleCenter p1 p2 p3 = isect (midLine p1 p2) (midLine p2 p3)

-- solve :: [Double] -> Double
solve [x1, y1, x2, y2, x3, y3] = n * r^2 * sin(theta)/2
    where p1 = (x1, y1)
          p2 = (x2, y2)
          p3 = (x3, y3)
          center = circleCenter p1 p2 p3
          v1 = p1 -. center
          v2 = p2 -. center
          v3 = p3 -. center
          r = len v1
          ang1 = ang v1 v2
          ang2 = ang v2 v3
          tol = 1e-5
          n1 = denominator $ approxRational (ang1/2/pi) tol
          n2 = denominator $ approxRational (ang2/2/pi) tol
          n = fromInteger $ lcm n1 n2
          theta = 2*pi/n

main = do readls <$> getContents >>= print . solve

import Data.Array
import Data.Ratio
import Data.Char
import Data.List
import Data.Bits

import System
import System.IO
import System.Random
import Control.Applicative
import Control.Monad
import qualified Data.Set as Set
import qualified Data.Map as Map

import Text.Printf

import Debug.Trace

-- newtype Point = Pt (Double, Double) deriving Show
type Point = (Double, Double) -- (x,y)
type Line = (Double, Double, Double) -- ax+by=c

infixr 6 -.
(-.) (x1, y1) (x2, y2) = (x1 - x2, y1 - y2)

len (x,y) = sqrt(x^2+y^2)
dot (x1, y1) (x2, y2) = x1*x2 + y1*y2
ang v1 v2 = if l1==0 || l2==0 then 0 else acos(cosine)
    where l1 = len v1
          l2 = len v2
          v = dot v1 v2/l1/l2
          cosine | v > 1     =  1.0
                 | v < -1    = -1.0
                 | otherwise =  v

readls :: (Read a) => String -> [a]
readls = map read . words

midLine :: Point -> Point -> Line
midLine (x1, y1) (x2, y2) = let a = y2-y1
                                b = x1-x2
                                c = a*(y1+y2)-b*(x1+x2)
                            in (-2*b, 2*a, c)

isect :: Line -> Line -> Point
isect (a1, b1, c1) (a2, b2, c2) = ((b2*c1-b1*c2)/det, (a1*c2-a2*c1)/det) where det = a1*b2 - a2*b1

-- given 3 point on cirlce, return center of circle
circleCenter :: Point -> Point -> Point -> Point
circleCenter p1 p2 p3 = isect (midLine p1 p2) (midLine p2 p3)

-- solve :: [Double] -> Double
solve [x1, y1, x2, y2, x3, y3] = n * r^2 * sin(2*pi/n)/2
    where p1 = (x1, y1)
          p2 = (x2, y2)
          p3 = (x3, y3)
          o = circleCenter p1 p2 p3
          v1 = p1 -. o
          v2 = p2 -. o
          v3 = p3 -. o
          r = len v1
          ang1 = ang v1 v2
          ang2 = ang v2 v3
          tol = 1e-5
          n1 = denominator $ approxRational (ang1/2/pi) tol
          n2 = denominator $ approxRational (ang2/2/pi) tol
          n = fromInteger $ lcm n1 n2

-- main = readls <$> getContents >>= print . solve
main = interact (show . solve . readls)

dist :: ((Double, Double), (Double, Double)) -> Double
dist ((x1, y1), (x2, y2)) = sqrt ((x1 - x2)^2 + (y1 - y2)^2)

findAngle :: (Double, Double, Double) -> Double
findAngle (a, b, c) = acos ((b^2 + c^2 - a^2) / (2*b*c) )

fgcd :: Double -> Double -> Double
fgcd a b
    | abs a < e || abs b < e = a + b
    | a > b = fgcd (step a b) b
    | otherwise = fgcd a (step b a)
    where
        e = 1e-4
        step x y = x - y * (fromIntegral $ floor (x / y))

findArea :: [[Double]] -> Double
findArea points = (n/2) * r^2 * sin (2*pi/n) where
    [p1, p2, p3] = map (\[p_x, p_y] -> (p_x, p_y)) points
    [a, b, c] = map dist [(p1, p2), (p2, p3), (p1, p3)]
    [alpha, beta, gamma] = map findAngle [(a, b, c), (b, a, c), (c, a, b)]
    r = a / (2*sin(alpha))
    n = pi/ fgcd alpha (fgcd beta gamma)

readLine :: IO [Double]
readLine = (map read) . words <$> getLine

main =
    readLine >>= \p1 ->
    readLine >>= \p2 ->
    readLine >>= \p3 ->
    print $ findArea [p1, p2, p3]

import Data.Complex
import Text.Printf

readComplex :: String -> Complex Double
readComplex = (\[x,y] -> x :+ y) . map read . words

area a b = imagPart $ a * conjugate b

angleSin a b = area a b / (magnitude a * magnitude b)

angle a b = phase (a * conjugate b)

circleR a b c = magnitude (b - c) / angleSin (b - a) (c - a) / 2

gcdR :: Double -> Double -> Double
gcdR a b
    | a < 0 || b < 0 = gcdR (abs a) (abs b)
    | a < b = gcdR b a
    | abs b < 1e-4 = a
    | otherwise = gcdR (a-b) b

solve [a,b,c] = n' * area0
  where
    r = circleR a b c
    angA = abs (angle (b - a) (c - a)) * 2
    angB = abs (angle (c - b) (a - b)) * 2
    angC = abs (angle (a - c) (b - c)) * 2
    invN = angA `gcdR` angB `gcdR` angC
    n = 2 * pi / invN
    n' = fromIntegral $ round n
    invN' = 2 * pi / n'
    area0 = r^2 * (sin invN') / 2

main = interact $ printf "%.10f" . solve . map readComplex . take 3 . lines

import Data.List

main :: IO ()
main = interact $ show . solve . map (map read . words) . lines

solve :: [[Double]] -> Double
solve [[x1, y1], [x2, y2], [x3, y3]] = sides * rsquare * sin (2 * pi / sides) / 2
  where
    a1 = 2 * (x2 - x1)
    b1 = 2 * (y2 - y1)
    c1 = x1**2 - x2**2 + y1**2 - y2**2
    a2 = 2 * (x3 - x1)
    b2 = 2 * (y3 - y1)
    c2 = x1**2 - x3**2 + y1**2 - y3**2
    x = (b1 * c2 - b2 * c1) / (a1 * b2 - a2 * b1)
    y = (c1 * a2 - c2 * a1) / (a1 * b2 - a2 * b1)
    dx1 = x1 - x
    dy1 = y1 - y
    dx2 = x2 - x
    dy2 = y2 - y
    dx3 = x3 - x
    dy3 = y3 - y
    angl1 = 2 * pi / (acos ((dx1 * dx2 + dy1 * dy2) / (sqrt ((dx1**2 + dy1**2) * (dx2**2 + dy2**2)))))
    angl2 = 2 * pi / (acos ((dx3 * dx2 + dy3 * dy2) / (sqrt ((dx3**2 + dy3**2) * (dx2**2 + dy2**2)))))
    angl3 = 2 * pi / (acos ((dx3 * dx1 + dy3 * dy1) / (sqrt ((dx3**2 + dy3**2) * (dx1**2 + dy1**2)))))
    sides = fromIntegral $ head $ filter (\n -> let m = fromIntegral n in allint (m / angl1, m / angl2, m / angl3)) ([3..] :: [Int])
    allint (a, b, c) = nearint a && nearint b && nearint c
    nearint a = abs (a - fromIntegral (round a :: Integer)) < 1e-4
    rsquare = sqrt ((dx1**2 + dy1**2) * (dx2**2 + dy2**2))
solve _ = undefined

import Data.List

main :: IO ()
main = getContents >>= print . solve . map (map read . words) . lines

solve :: [[Double]] -> Double
solve [[x1, y1], [x2, y2], [x3, y3]] = sides * rsquare * sin (2 * pi / sides) / 2
  where
    (x, y) = center (x1, y1) (x2, y2) (x3, y3)
    (dx1, dy1) = (x1 - x, y1 - y)
    (dx2, dy2) = (x2 - x, y2 - y)
    (dx3, dy3) = (x3 - x, y3 - y)
    a1 = 2 * pi / angle (dx1, dy1) (dx2, dy2)
    a2 = 2 * pi / angle (dx2, dy2) (dx3, dy3)
    a3 = 2 * pi / angle (dx3, dy3) (dx1, dy1)
    sides = head $ filter (\n -> allint (n / a1, n / a2, n / a3)) (map fromIntegral ([3..] :: [Int]))
    allint (a, b, c) = isNearInteger a && isNearInteger b && isNearInteger c
    isNearInteger a = abs (a - fromIntegral (round a :: Integer)) < 1e-4
    rsquare = dx1**2 + dy1**2
solve _ = undefined

center :: Floating t => (t, t) -> (t, t) -> (t, t) -> (t, t)
center (x1, y1) (x2, y2) (x3, y3) = (x, y)
  where x = ((x1**2 + y1**2) * (y2 - y3) + (x2**2 + y2**2) * (y3 - y1) + (x3**2 + y3**2) * (y1 - y2)) / d
        y = ((x1**2 + y1**2) * (x3 - x2) + (x2**2 + y2**2) * (x1 - x3) + (x3**2 + y3**2) * (x2 - x1)) / d
        d = 2 * (x1 * (y2 - y3) + x2 * (y3 - y1) + x3 * (y1 - y2))

inner :: Floating a => (a, a) -> (a, a) -> a
inner (dx1, dy1) (dx2, dy2) = dx1 * dx2 + dy1 * dy2

len :: Floating a => (a, a) -> a
len (dx1, dy1) = sqrt (dx1**2 + dy1**2)

angle :: Floating a => (a, a) -> (a, a) -> a
angle d1 d2 = acos (inner d1 d2 / (len d1 * len d2))

import Data.List

main :: IO ()
main = interact $ show . solve . map (map read . words) . lines

-- solve :: [[Float]] -> Float
solve [[x1, y1], [x2, y2], [x3, y3]] = sides * rsquare * sin (2 * pi / sides) / 2
  where
    a1 = 2 * (x2 - x1)
    b1 = 2 * (y2 - y1)
    c1 = x1**2 - x2**2 + y1**2 - y2**2
    a2 = 2 * (x3 - x1)
    b2 = 2 * (y3 - y1)
    c2 = x1**2 - x3**2 + y1**2 - y3**2
    x = (b1 * c2 - b2 * c1) / (a1 * b2 - a2 * b1)
    y = (c1 * a2 - c2 * a1) / (a1 * b2 - a2 * b1)
    dx1 = x1 - x
    dy1 = y1 - y
    dx2 = x2 - x
    dy2 = y2 - y
    dx3 = x3 - x
    dy3 = y3 - y
    angl1 = 2 * pi / (acos ((dx1 * dx2 + dy1 * dy2) / (sqrt ((dx1**2 + dy1**2) * (dx2**2 + dy2**2)))))
    angl2 = 2 * pi / (acos ((dx3 * dx2 + dy3 * dy2) / (sqrt ((dx3**2 + dy3**2) * (dx2**2 + dy2**2)))))
    angl3 = 2 * pi / (acos ((dx3 * dx1 + dy3 * dy1) / (sqrt ((dx3**2 + dy3**2) * (dx1**2 + dy1**2)))))
    sides = fromIntegral $ head $ filter (\n -> let m = fromIntegral n in allint (m / angl1, m / angl2, m / angl3)) ([3..] :: [Int])
    allint (a, b, c) = nearint a && nearint b && nearint c
    nearint a = abs (a - fromIntegral (round a :: Integer)) < 1e-4
    rsquare = sqrt ((dx1**2 + dy1**2) * (dx2**2 + dy2**2))
solve _ = undefined

import Data.List

main :: IO ()
main = interact $ show . solve . map (map read . words) . lines

solve :: [[Double]] -> Double
solve [[x1, y1], [x2, y2], [x3, y3]] = sides * rsquare * sin (2 * pi / sides) / 2
  where
    a1 = 2 * (x2 - x1)
    b1 = 2 * (y2 - y1)
    c1 = x1**2 - x2**2 + y1**2 - y2**2
    a2 = 2 * (x3 - x1)
    b2 = 2 * (y3 - y1)
    c2 = x1**2 - x3**2 + y1**2 - y3**2
    x = (b1 * c2 - b2 * c1) / (a1 * b2 - a2 * b1)
    y = (c1 * a2 - c2 * a1) / (a1 * b2 - a2 * b1)
    dx1 = x1 - x
    dy1 = y1 - y
    dx2 = x2 - x
    dy2 = y2 - y
    dx3 = x3 - x
    dy3 = y3 - y
    angl1 = 2 * pi / acos ((dx1 * dx2 + dy1 * dy2) / sqrt ((dx1**2 + dy1**2) * (dx2**2 + dy2**2)))
    angl2 = 2 * pi / acos ((dx3 * dx2 + dy3 * dy2) / sqrt ((dx3**2 + dy3**2) * (dx2**2 + dy2**2)))
    angl3 = 2 * pi / acos ((dx3 * dx1 + dy3 * dy1) / sqrt ((dx3**2 + dy3**2) * (dx1**2 + dy1**2)))
    sides = fromIntegral $ head $ filter (\n -> let m = fromIntegral n in allint (m / angl1, m / angl2, m / angl3)) ([3..] :: [Int])
    allint (a, b, c) = isNearInteger a && isNearInteger b && isNearInteger c
    isNearInteger a = abs (a - fromIntegral (round a :: Integer)) < 1e-4
    rsquare = dx1**2 + dy1**2
solve _ = undefined

import Data.List

main :: IO ()
main = interact $ show . solve . map (map read . words) . lines

solve :: [[Double]] -> Double
solve [[x1, y1], [x2, y2], [x3, y3]] = sides * rsquare * sin (2 * pi / sides) / 2
  where
    (x, y) = center (x1, y1) (x2, y2) (x3, y3)
    (dx1, dy1) = (x1 - x, y1 - y)
    (dx2, dy2) = (x2 - x, y2 - y)
    (dx3, dy3) = (x3 - x, y3 - y)
    a1 = 2 * pi / angle (dx1, dy1) (dx2, dy2)
    a2 = 2 * pi / angle (dx2, dy2) (dx3, dy3)
    a3 = 2 * pi / angle (dx3, dy3) (dx1, dy1)
    sides = head $ filter (\n -> allint (n / a1, n / a2, n / a3)) (map fromIntegral ([3..] :: [Int]))
    allint (a, b, c) = isNearInteger a && isNearInteger b && isNearInteger c
    isNearInteger a = abs (a - fromIntegral (round a :: Integer)) < 1e-4
    rsquare = dx1**2 + dy1**2
solve _ = undefined

center :: Floating t => (t, t) -> (t, t) -> (t, t) -> (t, t)
center (x1, y1) (x2, y2) (x3, y3) = (x, y)
  where x = ((x1**2 + y1**2) * (y2 - y3) + (x2**2 + y2**2) * (y3 - y1) + (x3**2 + y3**2) * (y1 - y2)) / d
        y = ((x1**2 + y1**2) * (x3 - x2) + (x2**2 + y2**2) * (x1 - x3) + (x3**2 + y3**2) * (x2 - x1)) / d
        d = 2 * (x1 * (y2 - y3) + x2 * (y3 - y1) + x3 * (y1 - y2))

inner :: Floating a => (a, a) -> (a, a) -> a
inner (dx1, dy1) (dx2, dy2) = dx1 * dx2 + dy1 * dy2

len :: Floating a => (a, a) -> a
len (dx1, dy1) = sqrt (dx1**2 + dy1**2)

angle :: Floating a => (a, a) -> (a, a) -> a
angle d1 d2 = acos (inner d1 d2 / (len d1 * len d2))

import Data.Functor

type Pair a = (a, a)

thresh :: RealFloat a => a
thresh = 1e-5

isInt :: RealFloat a => a -> Bool
isInt x = (<=thresh) . abs $ x - (fromIntegral . round) x

dist :: RealFloat a => Pair a -> Pair a -> a
dist (x, y) (x', y') = sqrt $ dx * dx + dy * dy
  where dx = x - x'
        dy = y - y'

distances :: RealFloat a => Pair a -> Pair a -> Pair a -> [a]
distances a b c = [dist a b, dist b c, dist c a]

circumradius :: RealFloat a => Pair a -> Pair a -> Pair a -> a
circumradius a b c = a' * b' * c' / (4 * area)
  where [a', b', c'] = distances a b c
        s = (a' + b' + c') / 2
        area = sqrt $ s * (s - a') * (s - b') * (s - c')

loc :: RealFloat a => a -> a -> a -> a
loc a b c = acos $ (a * a + b * b - c * c) / (2 * a * b)

angles :: RealFloat a => a -> a -> a -> [a]
angles a b c = [loc a b c, loc b c a, loc c a b]

good :: RealFloat a => a -> a -> Bool
good angle angle' = isInt $ angle / angle'

good' :: (RealFloat a, Integral b) => a -> a -> a -> b -> Bool
good' a b c n = and $ flip good angle <$> angles a b c
  where angle = pi / fromIntegral n

good'' :: (RealFloat a, Integral b) => Pair a -> Pair a -> Pair a -> b -> Bool
good'' a b c = good' a' b' c'
  where [a', b', c'] = distances a b c

area :: (RealFloat a, Integral b) => a -> b -> a
area r n = 0.5 * n' * r * r * sin t
  where t = 2 * pi / n'
        n' = fromIntegral n

solution :: RealFloat a => Pair a -> Pair a -> Pair a -> a
solution a b c = head $ area r <$> sides
  where r = circumradius a b c
        sides = map snd $ filter good''' $ (\n -> ((a, b, c), n)) <$> [3..100]
        good''' ((a, b, c), n) = good'' a b c n

main :: IO ()
main = do
  a <- readLine
  b <- readLine
  c <- readLine
  print $ solution a b c
  where readLine = (\[a, b] -> (a, b)) . map read . words <$> getLine

module Main where

frem :: Double -> Double -> Double
frem x y = x - (y * (fromIntegral (truncate (x / y))))

fgcd :: Double -> Double -> Double
fgcd x y =  fgcd_aux (abs x) (abs y) where
	fgcd_aux a b | abs b <= 1e-5 = a
				 | otherwise = fgcd_aux b (frem a b)

distance :: (Double, Double) -> (Double, Double) -> Double
distance (x1, y1) (x2, y2) = sqrt ((x1 - x2) ^ 2 + (y1 - y2) ^ 2)

angle :: Double -> Double -> Double -> Double
angle d1 d2 d3 = acos ((d1 ^ 2 + d2 ^ 2 - d3 ^ 2) / (2 * d1 * d2))

radius :: Double -> Double -> Double
radius a alpha = a / (2 * sin alpha)

compute :: (Double, Double) -> (Double, Double) -> (Double, Double) -> Double
compute p1 p2 p3 = let
		a = distance p1 p2;
		b = distance p2 p3;
		c = distance p3 p1;
		alpha = angle b c a;
		beta = angle c a b;
		gamma = angle a b c;
		r = radius a alpha;
		u = 2 * fgcd alpha (fgcd beta gamma) in r ^ 2 * pi / u * sin u

main :: IO ()
main = do
	input <- getContents
	let tokens = words input;
		p1 = (read (tokens !! 0), read (tokens !! 1));
		p2 = (read (tokens !! 2), read (tokens !! 3));
		p3 = (read (tokens !! 4), read (tokens !! 5)) in
		putStrLn (show (compute p1 p2 p3))

import Control.Arrow

main = do
  [ax,ay] <- readPoint
  [bx,by] <- readPoint
  [cx,cy] <- readPoint
  let d = 2*(ax*(by-cy)+bx*(cy-ay)+cx*(ay-by))
      dx = ((ay^2+ax^2)*(by-cy)+(by^2+bx^2)*(cy-ay)+(cy^2+cx^2)*(ay-by))/d
      dy = ((ay^2+ax^2)*(cx-bx)+(by^2+bx^2)*(ax-cx)+(cy^2+cx^2)*(bx-ax))/d
      aa = angle (bx-dx,by-dy) (cx-dx,cy-dy)
      ab = angle (cx-dx,cy-dy) (ax-dx,ay-dy)
      ac = angle (ax-dx,ay-dy) (bx-dx,by-dy)
      n = snd $ head $
          filter (isMultiple ac . fst) $
          filter (isMultiple ab . fst) $
          filter (isMultiple aa . fst) $
          map ((2*pi/) &&& id) [3..]
      r = sqrt ((ax-dx)^2 + (ay-dy)^2)
      a = n*r^2*sin(2*pi/n)/2
  print a

readPoint = fmap (map read . words) getLine
(a,b)·(c,d) = a*c+b*d
(a,b)×(c,d) = a*d-b*c
angle a b = abs (atan2 (a×b) (a·b))
isMultiple a b = abs (a - b*fromIntegral (round(a/b))) < pi/100000

dist ([x0,y0],[x1,y1]) = sqrt ((x0-x1)^2 + (y0-y1)^2)

cosLaw (a,b,c) =acos $ ( b^2 + c^2 - a^2 ) / ( 2*b*c )

sinLaw a th = a / 2 / sin th

isWhole a = abs(a - fromIntegral (round a)) < 1e-5

cal [p0,p1,p2] =
    let [a,b,c] = map dist [(p0,p1),(p1,p2),(p2,p0)]
        [a0,a1,a2] = map cosLaw [(a,b,c),(b,a,c),(c,a,b)]
        r = sinLaw a a0
        n = head $ filter (\x -> all (isWhole.(*x).(/pi)) [a0,a1,a2]) [3..100]
    in
       n * r * r / 2 * sin (2 * pi / n)

main = interact $ show.cal.map (map read.words).lines

import Control.Applicative
import Control.Monad
import Data.List
import Data.Ord
import Text.Printf

epsilon :: Double
epsilon = 1e-4

cross :: [[Double]] -> Double
cross [[y1, x1], [y2, x2], [y3, x3]] = (x2 - x1) * (y3 - y1) - (y2 - y1) * (x3 - x1)

distance :: [Double] -> [Double] -> Double
distance [y1, x1] [y2, x2] = sqrt $ (x2 - x1) ^ 2 + (y2 - y1) ^ 2

cap :: Double -> Double
cap = min 1 . max (negate 1)

unitVector :: [Double] -> [Double] -> [Double]
unitVector p1@[y1, x1] p2@[y2, x2] = cap . (/ d) <$> [x2 - x1, y2 - y1]
 where
  d = distance p1 p2

radian p@[y, x] = if y >= 0 then theta else 2 * pi - theta
 where
  theta = acos x

centerOfCircle :: [[Double]] -> [Double]
centerOfCircle ps@[[y1, x1], [y2, x2], [y3, x3]]
  | abs (cross ps) < epsilon = error $ "All the points are on a line."
  | otherwise                = [b / a, d / c]
 where
  a = 2 * (y1 * (x3 - x2) + y2 * (x1 - x3) + y3 * (x2 - x1))
  b = (y1 ^ 2 + x1 ^ 2) * (x3 - x2)
    + (y2 ^ 2 + x2 ^ 2) * (x1 - x3)
    + (y3 ^ 2 + x3 ^ 2) * (x2 - x1)
  c = 2 * (x1 * (y3 - y2) + x2 * (y1 - y3) + x3 * (y2 - y1))
  d = (y1 ^ 2 + x1 ^ 2) * (y3 - y2)
    + (y2 ^ 2 + x2 ^ 2) * (y1 - y3)
    + (y3 ^ 2 + x3 ^ 2) * (y2 - y1)

solve :: (Double, Int) -> [Double] -> Double
solve = fmap (((2 * pi) /) . fst) . foldl' search
 where
  search (theta, n) x = (theta / fromIntegral (until check succ n), 1)
   where
    check i
      | x `fmod` t < epsilon = True
      | otherwise            = False
     where
      t = theta / fromIntegral i
      v `fmod` d
        | r < epsilon || abs (1 - r) < epsilon = 0
        | otherwise                            = r
       where
        (_, r) = properFraction $ (v / d)

getDouble :: IO [Double]
getDouble = fmap read . words <$> getLine

main = do
  -- let ps = [[0, 0], [1, 1], [0, 1]]
  -- let ps = [[0, 1], [sqrt 3 / 2, 1 / 2], [0, -1]]
  -- let ps = [[0, 1], [sqrt 2 / 2, sqrt 2 / 2], [0, -1]]
  -- let ps = [[0, 1], [1 / 2, sqrt 3 / 2], [0, -1]]
  ps <- replicateM 3 getDouble
  let c  = centerOfCircle ps
  let [theta1, theta2, theta3] = sort $ radian <$> (unitVector c <$> ps)
  let xs = [theta2 - theta1, theta3 - theta2, 2 * pi - (theta3 - theta1)]
  let n = solve (2 * pi, 1) xs
  let r = distance c (head ps)
  printf "%.7f" $ (r ^ 2 * sin (2 * pi / n) / 2) * n

import Data.List
import Text.Printf

delta = 1e-6
isInteger x = abs (fromInteger (round x) - x) < 0.001

circle [[x1', y1'], [x2', y2'], [x3',y3']] =
	let {(x1, y1, x2, y2, x3, y3) = if abs(x2' - x1') < delta
		then (x1', y1', x3', y3', x2', y2')
		else if abs (x2' - x3') < delta then (x2', y2', x1', y1', x3', y3')
		else (x1', y1', x2', y2', x3', y3')} in
	let { ma = (y2 - y1)/(x2 - x1)
	; mb = (y3 - y2)/(x3 - x2)} in
	let x = (ma * mb * (y1 - y3) + mb * (x1 + x2) - ma * (x2 + x3)) / (2 * (mb - ma)) in
	let y = if abs ma > delta then -1 / ma * (x - (x1 + x2)/2) + (y1 + y2)/2
		else -1 / mb * (x - (x2 + x3)/2 ) + (y2 + y3)/2 in
	(x, y, sqrt((x - x1)**2 + (y - y1)**2))

dist x1 y1 x2 y2 = sqrt ((x1 - x2)**2 + (y1 - y2)**2)

angles coord (x, y, r) = let {as = sort $ map (\[xi, yi] -> let a = atan2 (xi - x) (yi - y)
		in if a < 0 then a + 2 * pi else a) coord} in
	fst $ foldl (\(l, a) x ->  ((x - a):l, x)) ([], head as) $ tail as

s::[[Double]] -> Double
s coords = let {(x, y, r) = circle coords} in
	let {[n] = take 1 $ filter (\x -> all isInteger $ map (/(2* pi / fromInteger x)) as) [3..100]
		where as = angles coords (x, y, r)}
	in let {a = pi / (fromInteger n)}
	in r ** 2 * (sin a) * (cos a) * (fromInteger n)

main = do {
	coords <- mapM (\_ -> getLine >>= (return . map read . words)) [1..3]
	--; let {[[x1, y1], [x2, y2], [x3, y3]] = coords}
	--; putStr (show (dist x1 y1 x2 y2) ++ "\n")
	--; putStr (show (dist x3 y3 x2 y2) ++ "\n")
	--; putStr (show (dist x1 y1 x3 y3) ++ "\n")
	--; putStr ((show $ radius coords) ++ "\n")
	--; putStr ((show $ angles coords (radius coords)) ++ "\n")
	; printf "%.6f" $ s coords
}

{-# LANGUAGE TypeApplications #-}
module Main
( main
, radius
, angle
, eps
, gcdA
, side
, solute
, Point (..)
) where

import Data.Int

newtype Point = Point (Double, Double)

radius :: Double -> Double -> Double -> Double
radius a b c = a * b * c / (4 * sqrt (p * (p - a) * (p - b) * (p - c)))
  where
    p = (a + b + c) / 2

eps :: Double
eps = 1e-4

gcdA :: Double -> Double -> Double
gcdA x y | (abs x < eps) || (abs y < eps) = x + y
gcdA x y | x > y = gcdA (decA x y) y
gcdA x y = gcdA x (decA y x)

decA :: Double -> Double -> Double
decA x y = x - y * fromIntegral @Int64 (floor $ x / y)

angle :: (Double, Double, Double) -> Double
angle (a,b,c) = acos $  (a * a + b * b - c * c) / (2 * a * b)

side :: (Point, Point) -> Double
side (Point (x1, y1), Point (x2, y2)) = sqrt $ (x1 - x2) ** 2 + (y1 - y2) ** 2

solute :: Point -> Point -> Point -> Double
solute va vb vc = n * r * r * sin (2 * pi / n) / 2
  where
    [a, b, c] = fmap side [(va, vb), (va, vc), (vb, vc)]
    r = radius a b c
    [x, y, z] = fmap angle [(a,b,c), (b,c,a), (c,a,b)]
    n = pi / gcdA (gcdA x y) z

getPoint :: IO Point
getPoint = do
  [x, y] <- (map read . words) `fmap` getLine
  pure $ Point (x, y)

main :: IO ()
main = do
  [a, b, c] <- sequence [getPoint, getPoint, getPoint]
  print $ solute a b c

module Main where

import Control.Monad
import Control.DeepSeq
import Data.Function
import Data.Ratio
import Data.Fixed
import Data.List
import Data.Char

--import Debug.Trace

type Point = (Double, Double)
type Vector = (Double, Double)

sameDouble :: Double -> Double -> Double -> Bool
sameDouble a b res = -res <= a - b && a - b <= res

samePoint res ((x1, y1), (x2, y2)) = sameDouble x1 x2 res && sameDouble y1 y2 res
dist (x1, y1) (x2, y2) = sqrt ((abs $ x1 - x2)**2 + (abs $ y1 - y2)**2)

add (x1, y1) (x2, y2) = (x1 + x2, y1 + y2)
halfVec (x1, y1) (x2, y2) = ((x2 - x1) / 2, (y2 - y1) / 2)
perpendic (x, y) = (y, -x)
scale k (x, y) = (k * x / l, k * y / l) where
    l = dist (x, y) (0, 0)

centerAngle nPoly nInterval = 2 * pi * fromIntegral nInterval / fromIntegral nPoly

centerPos res p1 p2 angle
    | angle > pi = centerPos res p2 p1 (2*pi - angle)
    | sameDouble angle pi res = p1 `add` halfVec p1 p2
    | otherwise = p1 `add` c_ `add` h_ where
        c = dist p1 p2
        c_ = halfVec p1 p2
        h = c / (2 * tan (angle/2))
        h_ = scale h $ perpendic c_

getArea r nPoly = triangleArea * fromIntegral nPoly where
    theta = centerAngle nPoly 1
    triangleArea = r * r * sin theta / 2

tryFit :: Double -> (Point, Point, Point) -> Int -> [Double]
tryFit res (p1,p2,p3) 101 = []
tryFit res (p1,p2,p3) nPoly = areas ++ tryFit res (p1,p2,p3) (nPoly+1) where
    center12 = map (\nInterval -> centerPos res p1 p2 $ centerAngle nPoly nInterval) [1..(nPoly-1)]
    center13 = map (\nInterval -> centerPos res p1 p3 $ centerAngle nPoly nInterval) [1..(nPoly-1)]
    centers = map fst $ nub $ filter (samePoint res) [ (c1, c2) | c1 <- center12, c2 <- center13 ]
    areas = map (\center -> getArea (dist p1 center) nPoly) centers

process :: [Point] -> Double
process points = minimum $ tryFit res (p1,p2,p3) 3 where
    (p1:p2:[p3]) = points
    sides = [ dist x y | x <- points, y <- points, x /= y ]
    res = maximum sides * 5e-7

getWords  = words <$> getLine :: IO [String]
getDoubles = map read <$> getWords :: IO [Double]
toPoint (x:[y]) = (x, y) :: Point

main = do
    points <- replicateM 3 (toPoint <$> getDoubles)
    print $ process points

dist ( [x0,y0], [x1,y1] ) = sqrt ( ( x1 - x0 )^2 + ( y1 - y0 )^2 )
angle (a,b,c) = acos ( ( c^2 + b^2 - a^2 ) / 2 / b / c )
isInteger x = abs ( x - fromIntegral ( round x ) ) <= 1e-5

solve [p0,p1,p2] =
	let
		[a,b,c] = map dist [ (p0,p1), (p1,p2), (p2,p0) ]
		[x,y,z] = map angle [ (a,b,c), (b,c,a), (c,a,b) ]
		r = a / 2 / sin x
		good a = all isInteger $ map (/a) [x,y,z]
		q = 2 * ( head $ filter good $ map (pi/) [3..100] )
	in
		r^2 * sin q * pi / q

main = interact $ show . solve . map ( map read . words ) . lines

dist ( [x0,y0], [x1,y1] ) = sqrt ( ( x1 - x0 )^2 + ( y1 - y0 )^2 )
angle (a,b,c) = acos ( ( c^2 + b^2 - a^2 ) / 2 / b / c )
isInteger x = abs ( x - fromIntegral ( round x ) ) <= 1e-5

solve [p0,p1,p2] =
	let
		[a,b,c] = map dist [ (p0,p1), (p1,p2), (p2,p0) ]
		[x,y,z] = map angle [ (a,b,c), (b,c,a), (c,a,b) ]
		r = a / 2 / sin x
		ok a = all isInteger $ map (/a) [x,y,z]
		q = 2 * ( head $ filter ok $ map (pi/) [3..100] )
	in
		r^2 * sin q * pi / q

main = interact $ show . solve . map ( map read . words ) . lines

distance ( [x0,y0], [x1,y1] )  = sqrt ( ( x1 - x0 )^2 + ( y1 - y0 )^2 )
angle (a,b,c) = acos ( ( c^2 + b^2 - a^2 ) / 2 / b / c )
isInteger x = abs ( x - fromIntegral ( round x ) ) <= 1e-5

area [p0,p1,p2] = let
		[a,b,c] = map distance [(p0,p1),(p1,p2),(p2,p0)]
                [x,y,z] = map angle [(a,b,c),(b,c,a),(c,a,b)]
                radius = a / 2 / sin x
                ok a = all isInteger $ map (/a) [x,y,z]
		q = 2 * ( head $ filter ok $ map (pi/) [3..100] )
                in
                  radius^2 * sin q * pi / q

main = interact $ show . area . map (map read . words) . lines

module Main where

dist (x0, y0) (x1, y1) = sqrt((x1 - x0) ^ 2 + (y1 - y0) ^ 2)

edge (ap, bp, cp) = (dist bp cp, dist cp ap, dist bp ap)
angle (a, b, c) = (deAngle a b c, deAngle b c a, deAngle c a b)

helen (a, b, c) = sqrt(s * (s - a) * (s - b) * (s - c))
    where s = (a + b + c) / 2

raidus (a, b, c) = a * b * c / 4 / (helen (a, b, c))

deAngle a b c = acos $ (b ^ 2 + c ^ 2 - a ^ 2) / (2 * b * c)

eps :: Double
eps = 0.01
-- fgcd :: Double -> Double -> Double
fgcd a b
  | abs a <= eps || abs b <= eps = a + b
  | a >= b = fgcd (a - b * (fromInteger (floor (a / b)))) b
  | otherwise = fgcd b a

fgcd3 (x, y, z) = fgcd (fgcd x y) z

ployN edges = pi / (fgcd3 $ angle edges)

areaN r n = n / 2 * r ^ 2 * sin(2 * pi / n)

sln pt = areaN r n
    where e = edge pt
          n = ployN e
          r = raidus e

getPoint = do
    l <- getLine
    let xs = words l
        ys = map (\w->read w::Double) xs
    return (ys!!0, ys!! 1)
main = do
    ap <- getPoint
    bp <- getPoint
    cp <- getPoint
    print $ sln (ap, bp, cp)

readPoint :: IO (Double, Double)
readPoint = fmap ( (\ [x,y] -> (x,y)) . map read . words) getLine

distance (x1,y1) (x2,y2) = sqrt ((x1-x2)*(x1-x2) + (y1-y2)*(y1-y2))

isInteger x = abs (x - fromIntegral(round x)) <= 1e-5

main = do
  p1 <- readPoint
  p2 <- readPoint
  p3 <- readPoint
  let a = distance p1 p2
      b = distance p2 p3
      c = distance p1 p3
      s = (a+b+c)/2
      r = a*b*c / 4 / sqrt(s*(s-a)*(s-b)*(s-c))
      alpha = acos ((b*b+c*c-a*a)/2/b/c)
      beta  = acos ((a*a+c*c-b*b)/2/a/c)
      gamma = acos ((b*b+a*a-c*c)/2/b/a)
      good n = all isInteger . map (/(pi/fromIntegral n)) $ [alpha, beta, gamma]
      (n:_) = filter good [3..100]
      area = fromIntegral n * r*r/2 * sin(2*pi/fromIntegral n)

  print area

import Data.List.Split(splitWhen)
import Data.Char
import Data.List
import Text.Printf

type Point = (Double, Double)

-- Return sqr of 3 edges, sorted
computeEdges:: Point->Point->Point->[Double]
computeEdges (x1, y1) (x2, y2) (x3, y3)
        = sort [sqrE1, sqrE2, sqrE3]
            where sqrE1 = (x1 - x2) ^ 2 + (y1 - y2) ^2
                  sqrE2 = (x1 - x3) ^ 2 + (y1 - y3) ^2
                  sqrE3 = (x3 - x2) ^ 2 + (y3 - y2) ^2

-- Get m th point of a n edges regular polygon. diameter = 1
getMthPoint:: Int->Int->Point
getMthPoint n m =
        (cos a, sin a)
            where a = 2*pi/(fromIntegral n)*(fromIntegral m)

-- Get all possible edges (e1^2, e2^2, e3^2) from
-- 3 points in a n-edges regular polygon. diameter = 1
allPossibleEdges::Int->[[Double]]
allPossibleEdges n = [computeEdges (1.0, 0.0) (getMthPoint n m2) (getMthPoint n m3) | m2<-[1..n `div` 2], m3<-[m2+1..n-1]]

-- If the 2 given triangles are similer return the ratio (^2), or Nothing
getSimilarRatioTriangle:: [Double]->[Double]->Maybe Double
getSimilarRatioTriangle es1 es2 =
    if maximum rs -  minimum rs < 1e-3
    then Just $ head rs
    else Nothing
         where rs = zipWith (/) es1 es2

-- The given triangle
es1 = computeEdges (0, 0) (1, 1) (0, 1)

computeArea:: Int -> Double
computeArea n = nd * 0.5 * (sin $ 2* pi / nd)
                where nd = fromIntegral n

getSimilarRatio:: [Double]->Int->Maybe Double
getSimilarRatio es1 n =
    if null result
    then Nothing
    else head result
    where result = dropWhile (==Nothing) $ map (getSimilarRatioTriangle es1) (allPossibleEdges n)

getArea:: [Double]->Int->Maybe Double
getArea es1 n =
        if ratio == Nothing
        then Nothing
        else (\(Just x)->Just $ x * area) ratio
        where area = computeArea n
              ratio = getSimilarRatio es1 n

main = do
    c <- getContents
    let i = splitWhen isSpace c
    let j = map read i ::[Double]
    let es1 = computeEdges (j!!0, j!!1) (j!!2, j!!3) (j!!4, j!!5)
    let result = head $ dropWhile (==Nothing) $ map (getArea es1) [3..100]
    (\(Just x)->printf "%.8f" $ x) result

import Data.List.Split(splitWhen)
import Data.Char
import Data.List
import Text.Printf
import Control.Monad(liftM)

type Point = (Double, Double)

-- Return sqr of 3 edges, sorted
computeEdges:: Point->Point->Point->[Double]
computeEdges (x1, y1) (x2, y2) (x3, y3)
        = sort [sqrE1, sqrE2, sqrE3]
            where sqrE1 = (x1 - x2) ^ 2 + (y1 - y2) ^2
                  sqrE2 = (x1 - x3) ^ 2 + (y1 - y3) ^2
                  sqrE3 = (x3 - x2) ^ 2 + (y3 - y2) ^2

-- Get m th point of a n edges regular polygon. diameter = 1
getMthPoint:: Int->Int->Point
getMthPoint n m =
        (cos a, sin a)
            where a = 2*pi/(fromIntegral n)*(fromIntegral m)

-- Get all possible edges (e1^2, e2^2, e3^2) from
-- 3 points in a n-edges regular polygon. diameter = 1
allPossibleEdges::Int->[[Double]]
allPossibleEdges n = [computeEdges (1.0, 0.0) (getMthPoint n m2) (getMthPoint n m3) | m2<-[1..n `div` 2], m3<-[m2+1..n-1]]

-- If the 2 given triangles are similer return the ratio (^2), or Nothing
getSimilarRatioTriangle:: [Double]->[Double]->Maybe Double
getSimilarRatioTriangle es1 es2 =
    if maximum rs -  minimum rs < minimum rs * 1e-6
    then Just $ head rs
    else Nothing
         where rs = zipWith (/) es1 es2

computeArea:: Int -> Double
computeArea n = nd * 0.5 * (sin $ 2* pi / nd)
                where nd = fromIntegral n

getSimilarRatio:: [Double]->Int->Maybe Double
getSimilarRatio es1 n =
    if null result
    then Nothing
    else head result
    where result = dropWhile (==Nothing) $ map (getSimilarRatioTriangle es1) (allPossibleEdges n)

getArea:: [Double]->Int->Maybe Double
getArea es1 n = liftM (*area) ratio
        where area = computeArea n
              ratio = getSimilarRatio es1 n

main = do
    c <- getContents
    let i = splitWhen isSpace c
    let j = map read i ::[Double]
    let es1 = computeEdges (j!!0, j!!1) (j!!2, j!!3) (j!!4, j!!5)
    let result = head $ dropWhile (==Nothing) $ map (getArea es1) [3..100]
    (\(Just x)->printf "%.8f" $ x) result

import Data.List (sort)
import Text.Printf (printf)
import Control.Monad (replicateM)

newtype Point2 a = Point2 { getPoint2 :: (a, a) } deriving (Eq, Show)
newtype Vector2 a = Vector2 { getVector2 :: (a, a) } deriving (Eq, Show)
type Line2 a = (Point2 a, Vector2 a)
type LineEquation2 a = (a, a, a)

x :: Point2 a -> a
x = fst . getPoint2
y :: Point2 a -> a
y = snd . getPoint2

xv :: Vector2 a -> a
xv = fst . getVector2
yv :: Vector2 a -> a
yv = snd . getVector2

computeEq2 :: (Num a) => Line2 a -> LineEquation2 a
computeEq2 (o, dir) = (a, b, c)
    where a = yv dir
          b = - (xv dir)
          c = -a * (x o) - b * (y o)

perpendicularLine2 :: (Num a) => Line2 a -> Line2 a
perpendicularLine2 (o, dir) = (o, perpendicularDir)
    where perpendicularDir = Vector2 $ (- (yv dir), xv dir)

isParallel2 :: (Eq a, Num a) => Line2 a -> Line2 a -> Bool
isParallel2 (_, dir) (_, dir') = collinear dir dir'

collinear :: (Eq a, Num a) => Vector2 a -> Vector2 a -> Bool
u `collinear` v = u <^> v == 0

(<^>) :: (Num a) => Vector2 a -> Vector2 a -> a
u <^> v = xv u * yv v - yv u * xv v

intersectLines2 :: (Eq a, Fractional a) => Line2 a -> Line2 a -> Maybe (Point2 a)
intersectLines2 l1 l2
    | isParallel2 l1 l2 = Nothing
    | otherwise = Just $ Point2 ((c2 * b1 - c1 * b2) / det, (a2 * c1 - a1 * c2) / det)
    where (a1, b1, c1) = computeEq2 l1
          (a2, b2, c2) = computeEq2 l2
          det = a1 * b2 - a2 * b1

calcCircleCenter :: (Eq a, Fractional a) => (Point2 a) -> (Point2 a) -> (Point2 a) -> Maybe (Point2 a)
calcCircleCenter p1 p2 p3 = intersectLines2 pline1 pline2
    where v1' = Vector2 (x p2 - x p1, y p2 - y p1)
          v2' = Vector2 (x p3 - x p2, y p3 - y p2)
          p1' = Point2 ((x p1 + x p2) / 2, (y p1 + y p2) / 2)
          p2' = Point2 ((x p2 + x p3) / 2, (y p2 + y p3) / 2)
          line1 = (p1', v1')
          line2 = (p2', v2')
          pline1 = perpendicularLine2 line1
          pline2 = perpendicularLine2 line2

calcAngle :: (RealFloat a) => (Point2 a) -> (Point2 a) -> (Point2 a) -> Maybe a
calcAngle c lp rp | ll > eps && lr > eps = Just $ acos $ (ll + lr - lc) / (2 * sqrt (ll * lr))
                  | otherwise = Nothing
                  where eps = 0.000001
                        ll = (x lp - x c) ^ 2 + (y lp - y c) ^ 2
                        lr = (x rp - x c) ^ 2 + (y rp - y c) ^ 2
                        lc = (x lp - x rp) ^ 2 + (y lp - y rp) ^ 2

detDivisor :: (RealFloat a, Integral b) => a -> a -> Maybe b
detDivisor a1 a2 = if (length res > 0) then Just (head res) else Nothing
                    where a3 = 2 * pi - a1 - a2 --the third angle
                          as = [a1, a2, a3]
                          res = map snd $ take 1 $ filter (\(v,_) -> isValid v as) [(2 * pi / (fromIntegral n), n) | n <- [3..100]]

isValid :: (RealFloat a) => a -> [a] -> Bool
isValid part vals = and (map (\v -> isClose (v / part)) vals)

isClose :: (RealFloat a) => a -> Bool
isClose v = abs (fromIntegral (round v) - v) < 0.000001

calcDistance :: (RealFloat a) => (Point2 a) -> (Point2 a) -> a
calcDistance p1 p2 = sqrt((x p1 - x p2) ^ 2 + (y p1 - y p2) ^ 2)

-- Calc everything in the maybe monad
calcSquare :: (RealFloat a, Show a) => (Point2 a) -> (Point2 a) -> (Point2 a) -> Maybe a
calcSquare p1 p2 p3 = do
                        center <- calcCircleCenter p1 p2 p3 -- find the center
                        a1 <- calcAngle center p1 p2 -- find three angles
                        a2 <- calcAngle center p1 p3
                        a3 <- calcAngle center p2 p3
                        let radius = calcDistance center p1
                        let [a1',a2'] = take 2 $ sort [a1,a2,a3]
                        n <- detDivisor a1' a2'
                        return $ radius ^ 2 * (fromIntegral n) * sin (2 * pi / (fromIntegral n)) / 2

testCircleCenter :: Bool
testCircleCenter = let cc = calcCircleCenter (Point2 (0,0)) (Point2 (1,1)) (Point2 (2,0)) in cc == Just (Point2 (1,0))

testCalcSquare :: (RealFloat a, Show a) => Maybe a
testCalcSquare = sq
                 where  p1 = Point2 (0,0)
                        p2 = Point2 (1,1)
                        p3 = Point2 (0,1)
                        sq = calcSquare p1 p2 p3

main :: IO ()
main = replicateM 3 getLine >>= return.map parsePoint >>= (\[p1,p2,p3] -> return $ calcSquare p1 p2 p3) >>=
        (\sq -> case sq of  Just s -> putStrLn $ show s
                            Nothing -> putStrLn "Error")

parsePoint :: (RealFloat a, Read a) => String -> (Point2 a)
parsePoint str =  Point2 (x,y)
                  where [x,y] = map read (words str)

import Data.Function(on)
import Data.List(sort)
import Data.Maybe(fromMaybe)
import Control.Monad(replicateM)

eps = 1e-5
dist (x1, y1) (x2, y2) = sqrt (on (+) (^2) (x2 - x1) (y2 - y1))
rad a b c = a * b * c / (4 * sqrt(p * (p - a) * (p - b) * (p - c)))
          where p = (a + b + c) / 2

angle ll lr lc = acos ((ll ^ 2 + lr ^ 2 - lc ^ 2) / (2 * ll * lr))

checkAngle :: [Double] -> Integer -> Bool
checkAngle angles n = isValidAngles angles (2 * pi / (fromIntegral n))

isValidAngles :: [Double] -> Double -> Bool
isValidAngles angles part = and (map (isValid part) angles)

isValid angle part = isClose (angle / part)
isClose v = abs (fromIntegral (round v) - v) < eps

getN :: Double -> Double -> Double -> Maybe Integer
getN a b c =  case (take 1 $ filter (checkAngle [a1', a2']) [3..100]) of
                  [] -> Nothing
                  n:_ -> Just n
              where r = rad a b c
                    a1 = angle r r a
                    a2 = angle r r b
                    a3 = angle r r c
                    a1':a2':_ = sort [a1,a2,a3]

getSq p1 p2 p3 = sq n r
                  where sq n r' = (fromIntegral n) * r' * r' * sin (2 * pi / (fromIntegral n)) / 2
                        a = dist p1 p2
                        b = dist p2 p3
                        c = dist p3 p1
                        r = rad a b c
                        n = fromMaybe 1 $ getN a b c

parseP :: String -> (Double, Double)
parseP str =  (x,y)
              where [x, y] = map read (words str)

main :: IO()
main = do
        p1l <- getLine
        p2l <- getLine
        p3l <- getLine
        print $ getSq (parseP p1l) (parseP p2l) (parseP p3l)

{-
    Find the area of the minimum regular polygon given three random vertices of
        said polygon
-}

circumRadius tot@[a,b,c] = (product tot) / sqrt ((a + b + c) * (b + c - a) * (c + a - b) * (a + b - c))

angleA [a,b,c] = acos ((b^2 + c^2 - a^2) / (2*b*c))
angleB [a,b,c] = angleA [b,c,a]
angleC [a,b,c] = angleA [c,a,b]

dblGCD :: Double -> Double -> Double -> Double
dblGCD m n e
    | abs m > e && abs n > e = if m > n
                                then dblGCD (m - (fromIntegral . floor $ (m/n)) * n) n e
                                else dblGCD m (n - (fromIntegral . floor $ (n/m)) * m) e
    | otherwise = m + n

area s t u r = n / (2 * r^2 * sin(2*pi/n))
    where n = pi / (dblGCD (dblGCD s t 10**(-4)) u 10**(-4))

main = do
    c1 <- getLine
    c2 <- getLine
    c3 <- getLine
    let co = map ((\[x,y] -> (x,y)) . map read . words) [c1,c2,c3] :: [(Double,Double)]
    let sl = zipWith (\(x1,y1) (x2,y2) -> sqrt ((x1 - x2)^2 + (y1 - y2)^2)) co (tail $ cycle co)
    putStrLn . show $ area (angleA sl) (angleB sl) (angleC sl) (circumRadius sl)

module Main (main) where

import Text.Printf

data Point = Point Double Double
data Line = Line Double Double Double

instance Show Point where
    show (Point x y) = "{" ++ show x ++ ", " ++ show y ++ "}"

instance Show Line where
    show (Line a b c) = "{(" ++ show a ++ ")*x + (" ++ show b ++ ")*y + (" ++ show c ++ ") = 0}"

-- прямая по двум точкам в виде Ax+By+C=0
createLine (Point x1 y1) (Point x2 y2) = (Line a b c) where
    a = y1-y2
    b = x2-x1
    c = x1*y2 - x2*y1

-- серединный перпендикуляр по двум точкам в виде Ax+By+C=0
midLine (Point x1 y1) (Point x2 y2) = (Line (-b) a (b*x0 - a*y0)) where
    a = y1-y2
    b = x2-x1
    x0 = (x2+x1)/2
    y0 = (y2+y1)/2

-- угол между двумя прямыми
angleLines (Line a1 b1 c1) (Line a2 b2 c2) = atan2 (a1*b2 - a2*b1) (a1*a2 + b1*b2)

-- угол между тремя точками (пересекающимися прямыми в первой точке)
anglePoints pCenter p1 p2 = angleLines (createLine pCenter p1) (createLine pCenter p2)

-- пересечение двух прямых
interLines (Line a1 b1 c1) (Line a2 b2 c2) = (Point (dx/dxy) (dy/dxy)) where
    dx = b1*c2 - b2*c1
    dy = c1*a2 - c2*a1
    dxy = a1*b2 - a2*b1

-- расстояние между точками
dist (Point x1 y1) (Point x2 y2) = sqrt (dx*dx + dy*dy) where
    dx = x1-x2
    dy = y1-y2

main = do
    instr <- getContents
    let [p1, p2, p3] = map readPoint $ take 3 $ lines instr
    let center = interLines (midLine p1 p2) (midLine p2 p3)
    printf "%.8f\n" $ squarePoli
                    (dist p1 center)
                    (findMinPoli (anglePoints center p1 p2) (anglePoints center p2 p3)) where

        -- площать многоугольника через радиус и количество углов
        squarePoli :: Double -> Int -> Double
        squarePoli r n = n2 * r*r * (sin (pi/n2)) where
            n2 = (fromIntegral n)/2

        -- сколько углов в минимальном многоугольнике с такими внутренними углами?
        findMinPoli :: Double -> Double -> Int
        findMinPoli a b = findMinPoli' 3 where

            findMinPoli' :: Int -> Int
            findMinPoli' n | n>=100 = 100
            findMinPoli' n = if (nearlyInt (a*n')) && (nearlyInt (b*n'))
                then n
                else findMinPoli' (n+1) where
                    n' = (fromIntegral n)/(pi*2)

            nearlyInt :: Double -> Bool
            nearlyInt d = (abs (d - (fromIntegral (round d)))) < 0.000001

-- input
readDouble :: String -> Double
readDouble = read

readPoint :: String -> Point
readPoint ss = (Point (coords!!0) (coords!!1)) where
    coords = map readDouble $ words ss

module Main (main) where

import Text.Printf

data Point = Point Double Double
data Line = Line Double Double Double

instance Show Point where
    show (Point x y) = "{" ++ show x ++ ", " ++ show y ++ "}"

instance Show Line where
    show (Line a b c) = "{(" ++ show a ++ ")*x + (" ++ show b ++ ")*y + (" ++ show c ++ ") = 0}"

-- прямая по двум точкам в виде Ax+By+C=0
createLine (Point x1 y1) (Point x2 y2) = (Line a b c) where
    a = y1-y2
    b = x2-x1
    c = x1*y2 - x2*y1

-- серединный перпендикуляр по двум точкам в виде Ax+By+C=0
midLine (Point x1 y1) (Point x2 y2) = (Line (-b) a (b*x0 - a*y0)) where
    a = y1-y2
    b = x2-x1
    x0 = (x2+x1)/2
    y0 = (y2+y1)/2

-- угол между двумя прямыми
angleLines (Line a1 b1 c1) (Line a2 b2 c2) = atan2 (a1*b2 - a2*b1) (a1*a2 + b1*b2)

-- угол между тремя точками (пересекающимися прямыми в первой точке)
anglePoints pCenter p1 p2 = angleLines (createLine pCenter p1) (createLine pCenter p2)

-- пересечение двух прямых
interLines (Line a1 b1 c1) (Line a2 b2 c2) = (Point (dx/dxy) (dy/dxy)) where
    dx = b1*c2 - b2*c1
    dy = c1*a2 - c2*a1
    dxy = a1*b2 - a2*b1

-- расстояние между точками
dist (Point x1 y1) (Point x2 y2) = sqrt (dx*dx + dy*dy) where
    dx = x1-x2
    dy = y1-y2

main = do
    instr <- getContents
    let [p1, p2, p3] = map readPoint $ take 3 $ lines instr
    let center = interLines (midLine p1 p2) (midLine p2 p3)
    printf "%.8f\n" $ squarePoli
                    (dist p1 center)
                    (findMinPoli (anglePoints center p1 p2) (anglePoints center p2 p3)) where

        -- площать многоугольника через радиус и количество углов
        squarePoli :: Double -> Int -> Double
        squarePoli r n = n2 * r*r * (sin (pi/n2)) where
            n2 = (fromIntegral n)/2

        -- сколько углов в минимальном многоугольнике с такими внутренними углами?
        findMinPoli :: Double -> Double -> Int
        findMinPoli a b = findMinPoli' 3 where

            findMinPoli' :: Int -> Int
            findMinPoli' n | n>=100 = 100
            findMinPoli' n = if (nearlyInt (a*n')) && (nearlyInt (b*n'))
                then n
                else findMinPoli' (n+1) where
                    n' = (fromIntegral n)/(pi*2)

            nearlyInt :: Double -> Bool
            nearlyInt d = (abs (d - (fromIntegral (round d)))) < 0.00000001

-- input
readDouble :: String -> Double
readDouble = read

readPoint :: String -> Point
readPoint ss = (Point (coords!!0) (coords!!1)) where
    coords = map readDouble $ words ss

import Control.Monad
import Debug.Trace

myTrace x = traceShow x x

data Point = Point Double Double
	deriving (Eq, Show)

vmul scalar (Point x y) = Point (scalar * x) (scalar * y)
vadd (Point x1 y1) (Point x2 y2) = Point (x1 + x2) (y1 + y2)
vsub (Point x1 y1) (Point x2 y2) = Point (x1 - x2) (y1 - y2)
vdot (Point x1 y1) (Point x2 y2) = x1 * x2 + y1 * y2
vabs p = distanceBetween p (Point 0 0)

distanceBetween (Point x1 y1) (Point x2 y2) = sqrt $ sqr (x2 - x1) + sqr (y2 - y1)
sqr x = x * x

getPoint = do
	xy <- (liftM words) getLine
	return $ Point (parse (xy !! 0)) (parse (xy !! 1))
	where
		parse :: String -> Double
		parse = read

getInput :: IO (Point, Point, Point)
getInput = do
	a1 <- getPoint
	a2 <- getPoint
	a3 <- getPoint
	return (a1, a2, a3)

triangleArea a1 a2 a3 = sqrt $ p * (p - a) * (p - b) * (p - c)
	where
		a = distanceBetween a2 a3
		b = distanceBetween a1 a3
		c = distanceBetween a1 a2
		p = (a + b + c) / 2

centerOf points@(a1, a2, a3) = (aa `vmul` a1) `vadd` (ab `vmul` a2) `vadd` (ac `vmul` a3)
	where
		aa = (sqr $ distanceBetween a2 a3) / (8 * sqr area) * vdot (a1 `vsub` a2) (a1 `vsub` a3)
		ab = (sqr $ distanceBetween a1 a3) / (8 * sqr area) * vdot (a2 `vsub` a1) (a2 `vsub` a3)
		ac = (sqr $ distanceBetween a1 a2) / (8 * sqr area) * vdot (a3 `vsub` a1) (a3 `vsub` a2)
		area = triangleArea a1 a2 a3

areaOfRegularPolygon :: Int -> Double -> Double
areaOfRegularPolygon n r = fromIntegral (n `div` 2) * sqr r * sin (2 * pi / fromIntegral n)

getNumberOfSides :: Double -> (Point, Point, Point) -> Int
getNumberOfSides r points@(a1, a2, a3) = n
	where
		(p1, p2, p3, n) = head $ filter almostIntegerTriple omega
		almostIntegerTriple (a, b, c, _) = almostInteger a && almostInteger b && almostInteger c
		almostInteger x = abs (x - (fromIntegral $ round x)) < 0.00001
		center = centerOf points
		alpha = normalize $ acos $ (a `vdot` b) / (vabs a * vabs b)
		beta = normalize $ acos $ (b `vdot` c) / (vabs b * vabs c)
		gamma = normalize $ acos $ (c `vdot` a) / (vabs c * vabs a)
		a = a1 `vsub` center
		b = a2 `vsub` center
		c = a3 `vsub` center
		omega = [(sin (fromIntegral i * alpha / 2),
			sin (fromIntegral i * beta / 2),
			sin (fromIntegral i * gamma / 2), i) | i <- [3..]]
		normalize x
			| x < 0 = x + 2 * pi
			| otherwise = x

main = do
	points@(a1, a2, a3) <- getInput
	let center = centerOf points
	let r = distanceBetween a1 center
	let n = getNumberOfSides r points
	print $ areaOfRegularPolygon n r

import Control.Monad
import Debug.Trace

data Point = Point Double Double
	deriving (Eq, Show)

vmul scalar (Point x y) = Point (scalar * x) (scalar * y)
vadd (Point x1 y1) (Point x2 y2) = Point (x1 + x2) (y1 + y2)
vsub (Point x1 y1) (Point x2 y2) = Point (x1 - x2) (y1 - y2)
vdot (Point x1 y1) (Point x2 y2) = x1 * x2 + y1 * y2

distanceBetween (Point x1 y1) (Point x2 y2) = sqrt $ sqr (x2 - x1) + sqr (y2 - y1)
sqr x = x * x

getPoint = do
	xy <- (liftM words) getLine
	return $ Point (parse (xy !! 0)) (parse (xy !! 1))
	where
		parse :: String -> Double
		parse = read

getInput :: IO (Point, Point, Point)
getInput = do
	a1 <- getPoint
	a2 <- getPoint
	a3 <- getPoint
	return (a1, a2, a3)

triangleArea a1 a2 a3 = sqrt $ p * (p - a) * (p - b) * (p - c)
	where
		a = distanceBetween a2 a3
		b = distanceBetween a1 a3
		c = distanceBetween a1 a2
		p = (a + b + c) / 2

centerOf points@(a1, a2, a3) = (aa `vmul` a1) `vadd` (ab `vmul` a2) `vadd` (ac `vmul` a3)
	where
		aa = (sqr $ distanceBetween a2 a3) / (8 * sqr area) * vdot (a1 `vsub` a2) (a1 `vsub` a3)
		ab = (sqr $ distanceBetween a1 a3) / (8 * sqr area) * vdot (a2 `vsub` a1) (a2 `vsub` a3)
		ac = (sqr $ distanceBetween a1 a2) / (8 * sqr area) * vdot (a3 `vsub` a1) (a3 `vsub` a2)
		area = triangleArea a1 a2 a3

areaOfRegularPolygon :: Int -> Double -> Double
areaOfRegularPolygon n r = fromIntegral (n `div` 2) * sqr r * sin (2 * pi / fromIntegral n)

getNumberOfSides :: Double -> (Point, Point, Point) -> Int
getNumberOfSides r points@(a1, a2, a3) = n
	where
		(p1, p2, p3, n) = head $ filter almostIntegerTriple (traceShow (take 10 omega) omega)
		almostIntegerTriple (a, b, c, _) = almostInteger a && almostInteger b && almostInteger c
		almostInteger x = abs (x - (fromIntegral $ round x)) < 0.00001
		alpha = normalize $ acos $ ((a1 `vsub` a2) `vdot` (a1 `vsub` a3)) / (b * c)
		beta = normalize $ acos $ ((a2 `vsub` a1) `vdot` (a2 `vsub` a3)) / (a * c)
		gamma = normalize $ acos $ ((a3 `vsub` a1) `vdot` (a3 `vsub` a2)) / (a * b)
		a = distanceBetween a2 a3
		b = distanceBetween a1 a3
		c = distanceBetween a1 a2
		omega = [(alpha / (pi / fromIntegral i),
			beta / (pi / fromIntegral i),
			gamma / (pi / fromIntegral i), i) | i <- [3..]]
		normalize x
			| x < 0 = x + 2 * pi
			| otherwise = x

main = do
	points@(a1, a2, a3) <- getInput
	let center = centerOf points
	let r = distanceBetween a1 center
	let n = getNumberOfSides r points
	print n
	print $ areaOfRegularPolygon n r

import Control.Monad
import Debug.Trace

myTrace x = traceShow x x

data Point = Point Double Double
	deriving (Eq, Show)

vmul scalar (Point x y) = Point (scalar * x) (scalar * y)
vadd (Point x1 y1) (Point x2 y2) = Point (x1 + x2) (y1 + y2)
vsub (Point x1 y1) (Point x2 y2) = Point (x1 - x2) (y1 - y2)
vdot (Point x1 y1) (Point x2 y2) = x1 * x2 + y1 * y2
vabs p = distanceBetween p (Point 0 0)

distanceBetween (Point x1 y1) (Point x2 y2) = sqrt $ sqr (x2 - x1) + sqr (y2 - y1)
sqr x = x * x

getPoint = do
	xy <- (liftM words) getLine
	return $ Point (parse (xy !! 0)) (parse (xy !! 1))
	where
		parse :: String -> Double
		parse = read

getInput :: IO (Point, Point, Point)
getInput = do
	a1 <- getPoint
	a2 <- getPoint
	a3 <- getPoint
	return (a1, a2, a3)

triangleArea a1 a2 a3 = sqrt $ p * (p - a) * (p - b) * (p - c)
	where
		a = distanceBetween a2 a3
		b = distanceBetween a1 a3
		c = distanceBetween a1 a2
		p = (a + b + c) / 2

centerOf points@(a1, a2, a3) = (aa `vmul` a1) `vadd` (ab `vmul` a2) `vadd` (ac `vmul` a3)
	where
		aa = (sqr $ distanceBetween a2 a3) / (8 * sqr area) * vdot (a1 `vsub` a2) (a1 `vsub` a3)
		ab = (sqr $ distanceBetween a1 a3) / (8 * sqr area) * vdot (a2 `vsub` a1) (a2 `vsub` a3)
		ac = (sqr $ distanceBetween a1 a2) / (8 * sqr area) * vdot (a3 `vsub` a1) (a3 `vsub` a2)
		area = triangleArea a1 a2 a3

areaOfRegularPolygon :: Int -> Double -> Double
areaOfRegularPolygon n r = fromIntegral (n `div` 2) * sqr r * sin (2 * pi / fromIntegral n)

getNumberOfSides :: Double -> (Point, Point, Point) -> Int
getNumberOfSides r points@(a1, a2, a3) = n
	where
		(p1, p2, p3, n) = head $ filter almostIntegerTriple omega
		almostIntegerTriple (a, b, c, _) = almostInteger a && almostInteger b && almostInteger c
		almostInteger x = abs x < 0.00001
		center = centerOf points
		alpha = normalize $ acos $ (a `vdot` b) / (vabs a * vabs b)
		beta = normalize $ acos $ (b `vdot` c) / (vabs b * vabs c)
		gamma = normalize $ acos $ (c `vdot` a) / (vabs c * vabs a)
		a = a1 `vsub` center
		b = a2 `vsub` center
		c = a3 `vsub` center
		omega = [(sin (fromIntegral i * alpha / 2),
			sin (fromIntegral i * beta / 2),
			sin (fromIntegral i * gamma / 2), i) | i <- [3..]]
		normalize x
			| x < 0 = x + 2 * pi
			| otherwise = x

main = do
	points@(a1, a2, a3) <- getInput
	let center = centerOf points
	let r = distanceBetween a1 center
	let n = getNumberOfSides r points
	print $ areaOfRegularPolygon n r

import Control.Monad
import Debug.Trace

data Point = Point Double Double
	deriving (Eq, Show)

vmul scalar (Point x y) = Point (scalar * x) (scalar * y)
vadd (Point x1 y1) (Point x2 y2) = Point (x1 + x2) (y1 + y2)
vsub (Point x1 y1) (Point x2 y2) = Point (x1 - x2) (y1 - y2)
vdot (Point x1 y1) (Point x2 y2) = x1 * x2 + y1 * y2

distanceBetween (Point x1 y1) (Point x2 y2) = sqrt $ sqr (x2 - x1) + sqr (y2 - y1)
sqr x = x * x

getPoint = do
	xy <- (liftM words) getLine
	return $ Point (parse (xy !! 0)) (parse (xy !! 1))
	where
		parse :: String -> Double
		parse = read

getInput :: IO (Point, Point, Point)
getInput = do
	a1 <- getPoint
	a2 <- getPoint
	a3 <- getPoint
	return (a1, a2, a3)

triangleArea a1 a2 a3 = sqrt $ p * (p - a) * (p - b) * (p - c)
	where
		a = distanceBetween a2 a3
		b = distanceBetween a1 a3
		c = distanceBetween a1 a2
		p = (a + b + c) / 2

centerOf points@(a1, a2, a3) = (aa `vmul` a1) `vadd` (ab `vmul` a2) `vadd` (ac `vmul` a3)
	where
		aa = (sqr $ distanceBetween a2 a3) / (8 * sqr area) * vdot (a1 `vsub` a2) (a1 `vsub` a3)
		ab = (sqr $ distanceBetween a1 a3) / (8 * sqr area) * vdot (a2 `vsub` a1) (a2 `vsub` a3)
		ac = (sqr $ distanceBetween a1 a2) / (8 * sqr area) * vdot (a3 `vsub` a1) (a3 `vsub` a2)
		area = triangleArea a1 a2 a3

areaOfRegularPolygon :: Int -> Double -> Double
areaOfRegularPolygon n r = fromIntegral (n `div` 2) * sqr r * sin (2 * pi / fromIntegral n)

getNumberOfSides :: Double -> (Point, Point, Point) -> Int
getNumberOfSides r points@(a1, a2, a3) = n
	where
		(p1, p2, p3, n) = head $ filter almostIntegerTriple omega
		almostIntegerTriple (a, b, c, _) = almostInteger a && almostInteger b && almostInteger c
		almostInteger x = abs (x - (fromIntegral $ round x)) < 0.00001
		alpha = normalize $ acos $ ((a1 `vsub` a2) `vdot` (a1 `vsub` a3)) / (b * c)
		beta = normalize $ acos $ ((a2 `vsub` a1) `vdot` (a2 `vsub` a3)) / (a * c)
		gamma = normalize $ acos $ ((a3 `vsub` a1) `vdot` (a3 `vsub` a2)) / (a * b)
		a = distanceBetween a2 a3
		b = distanceBetween a1 a3
		c = distanceBetween a1 a2
		omega = [(alpha / (pi / fromIntegral i),
			beta / (pi / fromIntegral i),
			gamma / (pi / fromIntegral i), i) | i <- [3..]]
		normalize x
			| x < 0 = x + 2 * pi
			| otherwise = x

main = do
	points@(a1, a2, a3) <- getInput
	let center = centerOf points
	let r = distanceBetween a1 center
	let n = getNumberOfSides r points
	print $ areaOfRegularPolygon n r

{-# OPTIONS_GHC -O2 -XNoMonomorphismRestriction #-}
{-# LANGUAGE BangPatterns #-}
{-(c) gorlum0 [at] gmail.com-}
import qualified Data.ByteString.Char8 as BS
import Data.List
import Data.Array
import Data.Char
import Control.Monad
import Debug.Trace (trace)
import Data.Maybe (fromJust)
import Text.Printf (printf)

dist [x1,y1] [x2,y2] = sqrt $ (x1-x2)**2 + (y1-y2)**2

isInteger x = abs (x - (fI . round) x) <= 1e-5

area [p1, p2, p3] = fI n * r*r/2 * sin(2*pi/fI n)
    where
    a = dist p1 p2
    b = dist p2 p3
    c = dist p1 p3
    s = (a+b+c) / 2
    r = a*b*c / 4 / sqrt(s*(s-a)*(s-b)*(s-c))
    alpha = acos $ 1 - 0.5*a**2/r**2
    beta  = acos $ 1 - 0.5*b**2/r**2
    gamma = acos $ 1 - 0.5*c**2/r**2
    fits n = all isInteger $ map (/(pi/fI n)) [alpha, beta, gamma]
    (n:_) = filter fits [3..]

main = do
    ls <- lines `fmap` getContents
    let xss = map (map read . words) ls :: [[Double]]
    forM_ (splitEvery 3 xss) $
        print . area

readNum = fst . fromJust . BS.readInteger
fI = fromIntegral
--- debug = flip trace
traceShow = trace . show
debug = flip traceShow
infixr 1 `debug2`
debug2 x msg = flip trace x (printf "%s: %s" msg $ show x)

infixr 1 ?
True ? x = const x
False ? _ = id

splitEvery _ [] = []
splitEvery n xs = ys : splitEvery n xs'
    where (ys, xs') = splitAt (fI n) xs

-- Codeforces 1C

{-# LANGUAGE MultiWayIf #-}

import qualified Data.ByteString.Char8 as BC
import Data.Fixed (mod')
import Text.Printf

main :: IO ()
main = BC.getContents >>= solve . map (read . BC.unpack) . BC.words >>= printf "%.6f"

solve :: [Double] -> IO Double
solve [x1, y1, x2, y2, x3, y3] = do
    let ab = (x2 - x1, y2 - y1)
        ac = (x3 - x1, y3 - y1)
        bc = (x3 - x2, y3 - y2)
    let r1 = sqrt $ dist ab
        r2 = sqrt $ dist ac
        r3 = sqrt $ dist bc
    let cc = (r1 + r2 + r3) / 2
        ss = sqrt (cc * (cc - r1) * (cc - r2) * (cc - r3)) -- 面积
        r = r1 * r2 * r3 / (4 * ss)                        -- 外接圆外径
    let delta1 = acos (1 - r1 * r1 / (2 * r * r))
        delta2 = acos (1 - r2 * r2 / (2 * r * r))
        delta3 = 2 * pi - delta1 - delta2
    let delta = fgcd delta1 (fgcd delta2 delta3)           -- 一条边对应的圆心角
        n = fromIntegral $ round $ 2 * pi / delta
    return $ 0.5 * r * r * sin delta * n

  where
    dist (u1, v1) = u1 * u1 + v1 * v1

    fgcd a b | a < 1e-4 = b
             | b < 1e-4 = a
             | otherwise = fgcd b (a `mod'` b)

-- Codeforces 1C

{-# LANGUAGE MultiWayIf #-}

import qualified Data.ByteString.Char8 as BC
import Data.Fixed (mod')
import Text.Printf

main :: IO ()
main = BC.getContents >>= solve . map (read . BC.unpack) . BC.words >>= printf "%.6f"

solve :: [Double] -> IO Double
solve [x1, y1, x2, y2, x3, y3] = do
    let ab = (x2 - x1, y2 - y1)
        ac = (x3 - x1, y3 - y1)
        ba = (x1 - x2, y1 - y2)
        bc = (x3 - x2, y3 - y2)
        ca = (x1 - x3, y1 - y3)
        cb = (x2 - x3, y2 - y3)
    let r1 = dist ab
        r2 = dist ac
        r3 = dist bc
        cc = (r1 + r2 + r3) / 2
        ss = sqrt (cc * (cc - r1) * (cc - r2) * (cc - r3)) -- 面积
        r = r1 * r2 * r3 / (4 * ss)                        -- 外接圆外径
    let delta1 = acos (1 - r1 * r1 / (2 * r * r))
        delta2 = acos (1 - r2 * r2 / (2 * r * r))
        delta3 = acos (1 - r3 * r3 / (2 * r * r))
    let delta = fgcd delta1 (fgcd delta2 delta3)       -- 一条边对应的圆心角
        n = 2 * pi / delta
    return $ 0.5 * r * r * sin delta * n

  where
    dist (u1, v1) = sqrt $ u1 * u1 + v1 * v1
    inner (u1, v1) (u2, v2) = u1 * u2 + v1 * v2

    fgcd a b | a < 1e-4 = b
             | b < 1e-4 = a
             | otherwise = fgcd b (a `mod'` b)

-- Codeforces 1C

import qualified Data.ByteString.Char8 as BC
import Text.Printf

main :: IO ()
main = BC.getContents >>= solve . map (read . BC.unpack) . BC.words >>= printf "%.6f"

solve :: [Double] -> IO Double
solve [x1, y1, x2, y2, x3, y3] = do
    let ab = (x2 - x1, y2 - y1)
        ac = (x3 - x1, y3 - y1)
        ba = (x1 - x2, y1 - y2)
        bc = (x3 - x2, y3 - y2)
        ca = (x1 - x3, y1 - y3)
        cb = (x2 - x3, y2 - y3)
    let delta1 = acos (inner ab ac / (dist ab * dist ac))
        delta2 = acos (inner ba bc / (dist ba * dist bc))
        delta3 = acos (inner ca cb / (dist ca * dist cb))
    n <- go delta1 delta2 delta3 3
    let x = minimum [dist ab, dist ac, dist bc]
        n' = fromIntegral n
    return $ x * x / 4 / tan (pi / n') * n'

  where
    dist (u1, v1) = sqrt $ u1 * u1 + v1 * v1
    inner (u1, v1) (u2, v2) = u1 * u2 + v1 * v2

    divided a b = let r = a / b in abs (fromInteger (round r) - r) < 1e-6

    go delta1 delta2 delta3 k = do
        let kx = pi / (fromIntegral k) -- 每个内角 n-2 等分大小为：180 / n
        if divided delta1 kx && divided delta1 kx && divided delta1 kx
            then return k
            else if k > 100 then return k else go delta1 delta2 delta3 (k + 1)

-- Codeforces 1C

import qualified Data.ByteString.Char8 as BC
import Text.Printf

main :: IO ()
main = BC.getContents >>= solve . map (read . BC.unpack) . BC.words >>= printf "%.6f"

solve :: [Double] -> IO Double
solve [x1, y1, x2, y2, x3, y3] = do
    let ab = (x2 - x1, y2 - y1)
        ac = (x3 - x1, y3 - y1)
        ba = (x1 - x2, y1 - y2)
        bc = (x3 - x2, y3 - y2)
        ca = (x1 - x3, y1 - y3)
        cb = (x2 - x3, y2 - y3)
    let delta1 = acos (inner ab ac / (dist ab * dist ac))
        delta2 = acos (inner ba bc / (dist ba * dist bc))
        delta3 = acos (inner ca cb / (dist ca * dist cb))
    let delta = minimum [delta1, delta2, delta3]
        n = round (pi / delta)
    let x = minimum [dist ab, dist ac, dist bc]
        n' = fromIntegral n
    return $ x * x / 4 / tan (pi / n') * n'

  where
    dist (u1, v1) = sqrt $ u1 * u1 + v1 * v1
    inner (u1, v1) (u2, v2) = u1 * u2 + v1 * v2

(⋅) = (*)

𝜋 = pi
𝜀 = 0.00001 -- epsilon. don't set this value too small!

𝘥 (𝑥₁, 𝑦₁) (𝑥₂, 𝑦₂) = sqrt $ (𝑥₁ - 𝑥₂)⋅(𝑥₁ - 𝑥₂) + (𝑦₁ - 𝑦₂)⋅(𝑦₁ - 𝑦₂)

𝜃 (𝑥₁, 𝑦₁) (𝑥₂, 𝑦₂) | abs (𝑥₂ - 𝑥₁) < 𝜀 = 𝜋/2
                     | 𝑥₁ > 𝑥₂ = 𝜋 + atan ((𝑦₂ - 𝑦₁)/(𝑥₂ - 𝑥₁))
                     | otherwise = atan ((𝑦₂ - 𝑦₁)/(𝑥₂ - 𝑥₁))

𝛿 (𝑥ᵣ, 𝑦ᵣ) (𝑥₁, 𝑦₁) (𝑥₂, 𝑦₂) = if 𝛾 < 𝜀 then 𝜋 else 𝛾
  where
    𝛾 = abs $ 𝜃 (𝑥ᵣ, 𝑦ᵣ) (𝑥₁, 𝑦₁) - 𝜃 (𝑥ᵣ, 𝑦ᵣ) (𝑥₂, 𝑦₂)

𝘧𝘨𝘤𝘥 𝛼 𝛽 | abs 𝛼 < 𝜀 = 𝛽
         | 𝛼 > 𝛽 = 𝘧𝘨𝘤𝘥 𝛽 𝛼
         | otherwise = 𝘧𝘨𝘤𝘥 (𝛽 - 𝛼) 𝛼

main = do
  -- Read 3 vertices
  line₁ <- getLine
  let 𝑥₁ = read (words line₁ !! 0) :: Double
  let 𝑦₁ = read (words line₁ !! 1) :: Double
  line₂ <- getLine
  let 𝑥₂ = read (words line₂ !! 0) :: Double
  let 𝑦₂ = read (words line₂ !! 1) :: Double
  line₃ <- getLine
  let 𝑥₃ = read (words line₃ !! 0) :: Double
  let 𝑦₃ = read (words line₃ !! 1) :: Double

  -- Find the center (𝑥ᵣ, 𝑦ᵣ)
  let 𝑎₁₂ = 𝑥₁ - 𝑥₂
  let 𝑏₁₂ = 𝑦₁ - 𝑦₂
  let 𝑐₁₂ = (𝑥₁⋅𝑥₁ - 𝑥₂⋅𝑥₂ + 𝑦₁⋅𝑦₁ - 𝑦₂⋅𝑦₂) / 2
  let 𝑎₁₃ = 𝑥₁ - 𝑥₃
  let 𝑏₁₃ = 𝑦₁ - 𝑦₃
  let 𝑐₁₃ = (𝑥₁⋅𝑥₁ - 𝑥₃⋅𝑥₃ + 𝑦₁⋅𝑦₁ - 𝑦₃⋅𝑦₃) / 2
  let 𝑥ᵣ = (𝑏₁₃⋅𝑐₁₂ - 𝑏₁₂⋅𝑐₁₃) / (𝑎₁₂⋅𝑏₁₃ - 𝑎₁₃⋅𝑏₁₂)
  let 𝑦ᵣ = (𝑎₁₂⋅𝑐₁₃ - 𝑎₁₃⋅𝑐₁₂) / (𝑎₁₂⋅𝑏₁₃ - 𝑎₁₃⋅𝑏₁₂)

  -- Determine number of edges 𝑛 and circumradius 𝑟
  let 𝛿₁₂ = 𝛿 (𝑥ᵣ, 𝑦ᵣ) (𝑥₁, 𝑦₁) (𝑥₂, 𝑦₂)
  let 𝛿₁₃ = 𝛿 (𝑥ᵣ, 𝑦ᵣ) (𝑥₁, 𝑦₁) (𝑥₃, 𝑦₃)
  let 𝜂 = 𝘧𝘨𝘤𝘥 𝛿₁₂ 𝛿₁₃
  let 𝑛 = round $ 2⋅𝜋 / 𝜂
  let 𝑟 = 𝘥 (𝑥ᵣ, 𝑦ᵣ) (𝑥₁, 𝑦₁)
  let 𝒂 = fromInteger 𝑛⋅𝑟⋅𝑟⋅sin (𝜂/2)⋅cos (𝜂/2)
  print 𝒂

(⋅) = (*)

𝜋 = pi
𝜀 = 0.00001 -- epsilon. do not set this value too small

𝘥 (𝑥₁, 𝑦₁) (𝑥₂, 𝑦₂) = sqrt $ (𝑥₁ - 𝑥₂)⋅(𝑥₁ - 𝑥₂) + (𝑦₁ - 𝑦₂)⋅(𝑦₁ - 𝑦₂)

𝜃 (𝑥₁, 𝑦₁) (𝑥₂, 𝑦₂) | abs (𝑥₂ - 𝑥₁) < 𝜀 = 𝜋/2
                     | 𝑥₁ > 𝑥₂ = 𝜋 + atan ((𝑦₂ - 𝑦₁)/(𝑥₂ - 𝑥₁))
                     | otherwise = atan ((𝑦₂ - 𝑦₁)/(𝑥₂ - 𝑥₁))

𝛿 (𝑥ᵣ, 𝑦ᵣ) (𝑥₁, 𝑦₁) (𝑥₂, 𝑦₂) = if 𝛾 < 𝜀 then 𝜋 else 𝛾
  where
    𝛾 = abs $ 𝜃 (𝑥ᵣ, 𝑦ᵣ) (𝑥₁, 𝑦₁) - 𝜃 (𝑥ᵣ, 𝑦ᵣ) (𝑥₂, 𝑦₂)

𝘧𝘨𝘤𝘥 𝛼 𝛽 | abs 𝛼 < 𝜀 = 𝛽
         | 𝛼 > 𝛽 = 𝘧𝘨𝘤𝘥 𝛽 𝛼
         | otherwise = 𝘧𝘨𝘤𝘥 (𝛽 - 𝛼) 𝛼

main = do
  -- Read 3 vertices
  line₁ <- getLine
  let 𝑥₁ = read (words line₁ !! 0) :: Double
  let 𝑦₁ = read (words line₁ !! 1) :: Double
  line₂ <- getLine
  let 𝑥₂ = read (words line₂ !! 0) :: Double
  let 𝑦₂ = read (words line₂ !! 1) :: Double
  line₃ <- getLine
  let 𝑥₃ = read (words line₃ !! 0) :: Double
  let 𝑦₃ = read (words line₃ !! 1) :: Double

  -- Find the center (𝑥ᵣ, 𝑦ᵣ)
  let 𝑎₁₂ = 𝑥₁ - 𝑥₂
  let 𝑏₁₂ = 𝑦₁ - 𝑦₂
  let 𝑐₁₂ = (𝑥₁⋅𝑥₁ - 𝑥₂⋅𝑥₂ + 𝑦₁⋅𝑦₁ - 𝑦₂⋅𝑦₂) / 2
  let 𝑎₁₃ = 𝑥₁ - 𝑥₃
  let 𝑏₁₃ = 𝑦₁ - 𝑦₃
  let 𝑐₁₃ = (𝑥₁⋅𝑥₁ - 𝑥₃⋅𝑥₃ + 𝑦₁⋅𝑦₁ - 𝑦₃⋅𝑦₃) / 2
  let 𝑥ᵣ = (𝑏₁₃⋅𝑐₁₂ - 𝑏₁₂⋅𝑐₁₃) / (𝑎₁₂⋅𝑏₁₃ - 𝑎₁₃⋅𝑏₁₂)
  let 𝑦ᵣ = (𝑎₁₂⋅𝑐₁₃ - 𝑎₁₃⋅𝑐₁₂) / (𝑎₁₂⋅𝑏₁₃ - 𝑎₁₃⋅𝑏₁₂)

  -- Determine number of edges 𝑛 and circumradius 𝑟
  let 𝛿₁₂ = 𝛿 (𝑥ᵣ, 𝑦ᵣ) (𝑥₁, 𝑦₁) (𝑥₂, 𝑦₂)
  let 𝛿₁₃ = 𝛿 (𝑥ᵣ, 𝑦ᵣ) (𝑥₁, 𝑦₁) (𝑥₃, 𝑦₃)
  let 𝜂 = 𝘧𝘨𝘤𝘥 (2⋅𝜋) $ 𝘧𝘨𝘤𝘥 𝛿₁₂ 𝛿₁₃
  let 𝑛 = fromInteger $ round (2⋅𝜋/𝜂)
  let 𝑟 = 𝘥 (𝑥ᵣ, 𝑦ᵣ) (𝑥₁, 𝑦₁)
  let 𝒂 = 𝑛⋅𝑟⋅𝑟⋅sin (𝜋/𝑛)⋅cos (𝜋/𝑛)
  print 𝒂

(⋅) = (*)

𝜋 = pi
𝜀 = 0.00001 -- epsilon. don't set this value too small!

𝘥 (𝑥₁, 𝑦₁) (𝑥₂, 𝑦₂) = sqrt $ (𝑥₁ - 𝑥₂)⋅(𝑥₁ - 𝑥₂) + (𝑦₁ - 𝑦₂)⋅(𝑦₁ - 𝑦₂)

𝜃 (𝑥₁, 𝑦₁) (𝑥₂, 𝑦₂) | abs (𝑥₂ - 𝑥₁) < 𝜀 = 𝜋/2
                     | 𝑥₁ > 𝑥₂ = 𝜋 + atan ((𝑦₂ - 𝑦₁)/(𝑥₂ - 𝑥₁))
                     | otherwise = atan ((𝑦₂ - 𝑦₁)/(𝑥₂ - 𝑥₁))

𝛿 (𝑥ᵣ, 𝑦ᵣ) (𝑥₁, 𝑦₁) (𝑥₂, 𝑦₂) = if 𝛾 < 𝜀 then 𝜋 else 𝛾
  where
    𝛾 = abs $ 𝜃 (𝑥ᵣ, 𝑦ᵣ) (𝑥₁, 𝑦₁) - 𝜃 (𝑥ᵣ, 𝑦ᵣ) (𝑥₂, 𝑦₂)

𝘧𝘨𝘤𝘥 𝛼 𝛽 | abs 𝛼 < 𝜀 = 𝛽
         | 𝛼 > 𝛽 = 𝘧𝘨𝘤𝘥 𝛽 𝛼
         | otherwise = 𝘧𝘨𝘤𝘥 (𝛽 - 𝛼) 𝛼

main = do
  -- Read 3 vertices
  line₁ <- getLine
  let 𝑥₁ = read (words line₁ !! 0) :: Double
  let 𝑦₁ = read (words line₁ !! 1) :: Double
  line₂ <- getLine
  let 𝑥₂ = read (words line₂ !! 0) :: Double
  let 𝑦₂ = read (words line₂ !! 1) :: Double
  line₃ <- getLine
  let 𝑥₃ = read (words line₃ !! 0) :: Double
  let 𝑦₃ = read (words line₃ !! 1) :: Double

  -- Find the center (𝑥ᵣ, 𝑦ᵣ)
  let 𝑎₁₂ = 𝑥₁ - 𝑥₂
  let 𝑏₁₂ = 𝑦₁ - 𝑦₂
  let 𝑐₁₂ = (𝑥₁⋅𝑥₁ - 𝑥₂⋅𝑥₂ + 𝑦₁⋅𝑦₁ - 𝑦₂⋅𝑦₂) / 2
  let 𝑎₁₃ = 𝑥₁ - 𝑥₃
  let 𝑏₁₃ = 𝑦₁ - 𝑦₃
  let 𝑐₁₃ = (𝑥₁⋅𝑥₁ - 𝑥₃⋅𝑥₃ + 𝑦₁⋅𝑦₁ - 𝑦₃⋅𝑦₃) / 2
  let 𝑥ᵣ = (𝑏₁₃⋅𝑐₁₂ - 𝑏₁₂⋅𝑐₁₃) / (𝑎₁₂⋅𝑏₁₃ - 𝑎₁₃⋅𝑏₁₂)
  let 𝑦ᵣ = (𝑎₁₂⋅𝑐₁₃ - 𝑎₁₃⋅𝑐₁₂) / (𝑎₁₂⋅𝑏₁₃ - 𝑎₁₃⋅𝑏₁₂)

  -- Determine number of edges 𝑛 and circumradius 𝑟
  let 𝛿₁₂ = 𝛿 (𝑥ᵣ, 𝑦ᵣ) (𝑥₁, 𝑦₁) (𝑥₂, 𝑦₂)
  let 𝛿₁₃ = 𝛿 (𝑥ᵣ, 𝑦ᵣ) (𝑥₁, 𝑦₁) (𝑥₃, 𝑦₃)
  let 𝜂 = 𝘧𝘨𝘤𝘥 𝛿₁₂ 𝛿₁₃
  let 𝑛 = fromInteger $ round (2⋅𝜋/𝜂)
  let 𝑟 = 𝘥 (𝑥ᵣ, 𝑦ᵣ) (𝑥₁, 𝑦₁)
  let 𝒂 = 𝑛⋅𝑟⋅𝑟⋅sin (𝜋/𝑛)⋅cos (𝜋/𝑛)
  print 𝒂

import Control.Monad

π = pi
ε = 0.000001

distance (x₁, y₁) (x₂, y₂) = sqrt $ (x₁ - x₂) * (x₁ - x₂) + (y₁ - y₂) * (y₁ - y₂)

θ (x₁, y₁) (x₂, y₂) | abs (x₂ - x₁) < ε = π / 2
                     | x₁ > x₂ = π + atan ((y₂ - y₁) / (x₂ - x₁))
                     | otherwise = atan ((y₂ - y₁) / (x₂ - x₁))

δ (xᵣ, yᵣ) (x₁, y₁) (x₂, y₂) = if δ' < ε then π else δ'
  where
    δ' = abs (θ (xᵣ, yᵣ) (x₁, y₁) - θ (xᵣ, yᵣ) (x₂, y₂))

fgcd :: Double -> Double -> Double
fgcd α β | abs α < ε = β
         | α > β = fgcd β α
         | otherwise = fgcd (β - α) α

main = do
  line₁ <- getLine
  let x₁ = read (words line₁ !! 0) :: Double
  let y₁ = read (words line₁ !! 1) :: Double
  line₂ <- getLine
  let x₂ = read (words line₂ !! 0) :: Double
  let y₂ = read (words line₂ !! 1) :: Double
  line₃ <- getLine
  let x₃ = read (words line₃ !! 0) :: Double
  let y₃ = read (words line₃ !! 1) :: Double

  --let (x₁₂, y₁₂) = midpoint (x₁, y₁) (x₂, y₂)
  --let (x₁₃, y₁₃) = midpoint (x₁, y₁) (x₃, y₃)

  let a₁₂ = x₁ - x₂
  let b₁₂ = y₁ - y₂
  let c₁₂ = (x₁ * x₁ - x₂ * x₂ + y₁ * y₁ - y₂ * y₂) / 2
  let a₁₃ = x₁ - x₃
  let b₁₃ = y₁ - y₃
  let c₁₃ = (x₁ * x₁ - x₃ * x₃ + y₁ * y₁ - y₃ * y₃) / 2
  let xᵣ = (b₁₃ * c₁₂ - b₁₂ * c₁₃) / (a₁₂ * b₁₃ - a₁₃ * b₁₂)
  let yᵣ = (a₁₂ * c₁₃ - a₁₃ * c₁₂) / (a₁₂ * b₁₃ - a₁₃ * b₁₂)
  --print (xᵣ, yᵣ)

  let δ₁₂ = δ (xᵣ, yᵣ) (x₁, y₁) (x₂, y₂)
  let δ₁₃ = δ (xᵣ, yᵣ) (x₁, y₁) (x₃, y₃)
  let η = fgcd δ₁₂ δ₁₃
  --print (δ₁₂, δ₁₃)

  let n = round $ 2 * π / η
  --print n
  let r = distance (xᵣ, yᵣ) (x₁, y₁)
  let area = fromInteger n * r * r * sin (η / 2) * cos (η / 2)
  print area

  return ()

import Data.Array
import Data.Ratio
import Data.Char
import Data.List
import Data.Bits

import System
import System.IO
import System.Random
import Control.Applicative
import Control.Monad
import qualified Data.Set as Set
import qualified Data.Map as Map

import Text.Printf

import Debug.Trace

-- newtype Point = Pt (Double, Double) deriving Show
type Point = (Double, Double) -- (x,y)
type Line = (Double, Double, Double) -- ax+by=c

infixr 7 -.
(-.) (x1, y1) (x2, y2) = (x1 - x2, y1 - y2)

len (x,y) = sqrt(x^2+y^2)
dot (x1, y1) (x2, y2) = x1*x2 + y1*y2
ang v1 v2 = if l1==0 || l2==0 then 0 else acos(cosine)
    where l1 = len v1
          l2 = len v2
          v = dot v1 v2/l1/l2
          cosine | v > 1     =  1.0
                 | v < -1    = -1.0
                 | otherwise =  v

readls :: (Read a) => String -> [a]
readls = map read . words

midLine :: Point -> Point -> Line
midLine (x1, y1) (x2, y2) = let a = y2-y1
                                b = x1-x2
                                c = a*(y1+y2)-b*(x1+x2)
                            in (-2*b, 2*a, c)

isect :: Line -> Line -> Point
isect (a1, b1, c1) (a2, b2, c2) = ((b2*c1-b1*c2)/det, (a1*c2-a2*c1)/det) where det = a1*b2 - a2*b1

-- given 3 point on cirlce, return center of circle
circleCenter :: Point -> Point -> Point -> Point
circleCenter p1 p2 p3 = isect (midLine p1 p2) (midLine p2 p3)

-- solve :: [Double] -> Double
solve [x1, y1, x2, y2, x3, y3] = n
    where p1 = (x1, y1)
          p2 = (x2, y2)
          p3 = (x3, y3)
          center = circleCenter p1 p2 p3
          v1 = p1 -. center
          v2 = p2 -. center
          v3 = p3 -. center
          r = len v1
          ang1 = ang v1 v2
          ang2 = ang v2 v3
          tol = 1e-5
          r1 = approxRational (abs$ ang1/2/pi) tol
          r2 = approxRational (abs$ ang2/2/pi) tol
          n = lcm (denominator r1) (denominator r2)

main = do readls <$> getContents >>= print . solve

import Data.Array
import Data.Ratio
import Data.Char
import Data.List
import Data.Bits

import System
import System.IO
import System.Random
import Control.Applicative
import Control.Monad
import qualified Data.Set as Set
import qualified Data.Map as Map

import Text.Printf

import Debug.Trace

-- newtype Point = Pt (Double, Double) deriving Show
type Point = (Double, Double) -- (x,y)
type Line = (Double, Double, Double) -- ax+by=c

infixr 7 -.
(-.) (x1, y1) (x2, y2) = (x1 - x2, y1 - y2)

len (x,y) = sqrt(x^2+y^2)
dot (x1, y1) (x2, y2) = x1*x2 + y1*y2
ang v1 v2 = if l1==0 || l2==0 then 0 else acos(cosine)
    where l1 = len v1
          l2 = len v2
          v = dot v1 v2/l1/l2
          cosine | v > 1     =  1.0
                 | v < -1    = -1.0
                 | otherwise =  v

readls :: (Read a) => String -> [a]
readls = map read . words

midLine :: Point -> Point -> Line
midLine (x1, y1) (x2, y2) = let a = y2-y1
                                b = x1-x2
                                c = a*(y1+y2)-b*(x1+x2)
                            in (-2*b, 2*a, c)

isect :: Line -> Line -> Point
isect (a1, b1, c1) (a2, b2, c2) = ((b2*c1-b1*c2)/det, (a1*c2-a2*c1)/det) where det = a1*b2 - a2*b1

-- given 3 point on cirlce, return center of circle
circleCenter :: Point -> Point -> Point -> Point
circleCenter p1 p2 p3 = isect (midLine p1 p2) (midLine p2 p3)

-- solve :: [Double] -> Double
solve [x1, y1, x2, y2, x3, y3] = n
    where p1 = (x1, y1)
          p2 = (x2, y2)
          p3 = (x3, y3)
          center = circleCenter p1 p2 p3
          v1 = p1 -. center
          v2 = p2 -. center
          v3 = p3 -. center
          r = len v1
          ang1 = ang v1 v2
          ang2 = ang v2 v3
          tol = 1e-3
          r1 = approxRational (ang1/2/pi) tol
          r2 = approxRational (ang2/2/pi) tol
          n = lcm (denominator r1) (denominator r2)

main = do readls <$> getContents >>= print . solve

import Data.Array
import Data.Ratio
import Data.Char
import Data.List
import Data.Bits

import System
import System.IO
import System.Random
import Control.Applicative
import Control.Monad
import qualified Data.Set as Set
import qualified Data.Map as Map

import Text.Printf

import Debug.Trace

-- newtype Point = Pt (Double, Double) deriving Show
type Point = (Double, Double) -- (x,y)
type Line = (Double, Double, Double) -- ax+by=c

infixr 7 -.
(-.) (x1, y1) (x2, y2) = (x1 - x2, y1 - y2)

len (x,y) = sqrt(x^2+y^2)
dot (x1, y1) (x2, y2) = x1*x2 + y1*y2
ang v1 v2 = if l1==0 || l2==0 then 0 else acos(cosine)
    where l1 = len v1
          l2 = len v2
          v = dot v1 v2/l1/l2
          cosine | v > 1     =  1.0
                 | v < -1    = -1.0
                 | otherwise =  v

readls :: (Read a) => String -> [a]
readls = map read . words

midLine :: Point -> Point -> Line
midLine (x1, y1) (x2, y2) = let a = y2-y1
                                b = x1-x2
                                c = a*(y1+y2)-b*(x1+x2)
                            in (-2*b, 2*a, c)

isect :: Line -> Line -> Point
isect (a1, b1, c1) (a2, b2, c2) = ((b2*c1-b1*c2)/det, (a1*c2-a2*c1)/det) where det = a1*b2 - a2*b1

-- given 3 point on cirlce, return center of circle
circleCenter :: Point -> Point -> Point -> Point
circleCenter p1 p2 p3 = isect (midLine p1 p2) (midLine p2 p3)

-- solve :: [Double] -> Double
solve [x1, y1, x2, y2, x3, y3] = n
    where p1 = (x1, y1)
          p2 = (x2, y2)
          p3 = (x3, y3)
          center = circleCenter p1 p2 p3
          v1 = p1 -. center
          v2 = p2 -. center
          v3 = p3 -. center
          r = len v1
          ang1 = ang v1 v2
          ang2 = ang v2 v3
          tol = 1e-4
          r1 = approxRational (ang1/2/pi) tol
          r2 = approxRational (ang2/2/pi) tol
          n = lcm (denominator r1) (denominator r2)

main = do readls <$> getContents >>= print . solve

import Data.Array
import Data.Ratio
import Data.Char
import Data.List
import Data.Bits

import System
import System.IO
import System.Random
import Control.Applicative
import Control.Monad
import qualified Data.Set as Set
import qualified Data.Map as Map

import Text.Printf

import Debug.Trace

-- newtype Point = Pt (Double, Double) deriving Show
type Point = (Double, Double) -- (x,y)
type Line = (Double, Double, Double) -- ax+by=c

infixr 7 -.
(-.) (x1, y1) (x2, y2) = (x1 - x2, y1 - y2)

len (x,y) = sqrt(x^2+y^2)
dot (x1, y1) (x2, y2) = x1*x2 + y1*y2
ang v1 v2 = if l1==0 || l2==0 then 0 else acos(cosine)
    where l1 = len v1
          l2 = len v2
          v = dot v1 v2/l1/l2
          cosine | v > 1     =  1.0
                 | v < -1    = -1.0
                 | otherwise =  v

readls :: (Read a) => String -> [a]
readls = map read . words

midLine :: Point -> Point -> Line
midLine (x1, y1) (x2, y2) = let a = y2-y1
                                b = x1-x2
                                c = a*(y1+y2)-b*(x1+x2)
                            in (-2*b, 2*a, c)

isect :: Line -> Line -> Point
isect (a1, b1, c1) (a2, b2, c2) = ((b2*c1-b1*c2)/det, (a1*c2-a2*c1)/det) where det = a1*b2 - a2*b1

-- given 3 point on cirlce, return center of circle
circleCenter :: Point -> Point -> Point -> Point
circleCenter p1 p2 p3 = isect (midLine p1 p2) (midLine p2 p3)

-- solve :: [Double] -> Double
solve [x1, y1, x2, y2, x3, y3] = n
    where p1 = (x1, y1)
          p2 = (x2, y2)
          p3 = (x3, y3)
          center = circleCenter p1 p2 p3
          v1 = p1 -. center
          v2 = p2 -. center
          v3 = p3 -. center
          r = len v1
          ang1 = ang v1 v2
          ang2 = ang v2 v3
          tol = 1e-6
          r1 = approxRational (ang1/2/pi) tol
          r2 = approxRational (ang2/2/pi) tol
          n = lcm (denominator r1) (denominator r2)

main = do readls <$> getContents >>= print . solve

import Data.Array
import Data.Ratio
import Data.Char
import Data.List
import Data.Bits

import System
import System.IO
import System.Random
import Control.Applicative
import Control.Monad
import qualified Data.Set as Set
import qualified Data.Map as Map

import Text.Printf

import Debug.Trace

-- newtype Point = Pt (Double, Double) deriving Show
type Point = (Double, Double) -- (x,y)
type Line = (Double, Double, Double) -- ax+by=c

infixr 7 -.
(-.) (x1, y1) (x2, y2) = (x1 - x2, y1 - y2)

len (x,y) = sqrt(x^2+y^2)
dot (x1, y1) (x2, y2) = x1*x2 + y1*y2
ang v1 v2 = if l1==0 || l2==0 then 0 else acos(cosine)
    where l1 = len v1
          l2 = len v2
          v = dot v1 v2/l1/l2
          cosine | v > 1     =  1.0
                 | v < -1    = -1.0
                 | otherwise =  v

readls :: (Read a) => String -> [a]
readls = map read . words

midLine :: Point -> Point -> Line
midLine (x1, y1) (x2, y2) = let a = y2-y1
                                b = x1-x2
                                c = a*(y1+y2)-b*(x1+x2)
                            in (-2*b, 2*a, c)

isect :: Line -> Line -> Point
isect (a1, b1, c1) (a2, b2, c2) = ((b2*c1-b1*c2)/det, (a1*c2-a2*c1)/det) where det = a1*b2 - a2*b1

-- given 3 point on cirlce, return center of circle
circleCenter :: Point -> Point -> Point -> Point
circleCenter p1 p2 p3 = isect (midLine p1 p2) (midLine p2 p3)

-- solve :: [Double] -> Double
solve [x1, y1, x2, y2, x3, y3] = n
    where p1 = (x1, y1)
          p2 = (x2, y2)
          p3 = (x3, y3)
          center = circleCenter p1 p2 p3
          v1 = p1 -. center
          v2 = p2 -. center
          v3 = p3 -. center
          r = len v1
          ang1 = ang v1 v2
          ang2 = ang v2 v3
          r1 = approxRational (ang1/2/pi) 1e-5
          r2 = approxRational (ang2/2/pi) 1e-5
          n = lcm (denominator r1) (denominator r2)

main = do readls <$> getContents >>= print . solve

import Data.Complex
import Text.Printf

readComplex :: String -> Complex Double
readComplex = (\[x,y] -> x :+ y) . map read . words

area a b = imagPart $ a * b

angleSin a b = area a b / (magnitude a * magnitude b)

angle a b = phase (a * conjugate b)

circleR a b c = magnitude (b - c) / angleSin (b - a) (c - a) / 2

gcdR a b
    | a < 0 || b < 0 = gcdR (abs a) (abs b)
    | a < b = gcdR b a
    | b < 1e-5 = a
    | otherwise = gcdR (a-b) b

solve [a,b,c] = n * len0
  where
    norm ang = if ang < 0 then ang + 2 * pi else ang
    r = circleR a b c
    angA = norm (angle (b - a) (c - a)) * 2
    angB = norm (angle (c - b) (a - b)) * 2
    angC = norm (angle (a - c) (b - c)) * 2
    invN = angA `gcdR` angB `gcdR` angC
    n = 2 * pi / invN
    len0 = r * sin (invN / 2) * 2

main = interact $ printf "%.10f" . solve . map readComplex . take 3 . lines

import Data.Complex
import Text.Printf

readComplex :: String -> Complex Double
readComplex = (\[x,y] -> x :+ y) . map read . words

area a b = imagPart $ a * conjugate b

angleSin a b = area a b / (magnitude a * magnitude b)

angle a b = phase (a * conjugate b)

circleR a b c = magnitude (b - c) / angleSin (b - a) (c - a) / 2

gcdR a b
    | a < 0 || b < 0 = gcdR (abs a) (abs b)
    | a < b = gcdR b a
    | b < 1e-5 = a
    | otherwise = gcdR (a-b) b

solve [a,b,c] = n * area0
  where
    r = circleR a b c
    angA = abs (angle (b - a) (c - a)) * 2
    angB = abs (angle (c - b) (a - b)) * 2
    angC = abs (angle (a - c) (b - c)) * 2
    invN = angA `gcdR` angB `gcdR` angC
    n = 2 * pi / invN
    area0 = r^2 * (sin invN) / 2

main = interact $ printf "%.10f" . solve . map readComplex . take 3 . lines

import Data.Complex
import Text.Printf

readComplex :: String -> Complex Double
readComplex = (\[x,y] -> x :+ y) . map read . words

area a b = imagPart $ a * conjugate b

angleSin a b = area a b / (magnitude a * magnitude b)

angle a b = phase (a * conjugate b)

circleR a b c = magnitude (b - c) / angleSin (b - a) (c - a) / 2

gcdR a b
    | a < 0 || b < 0 = gcdR (abs a) (abs b)
    | a < b = gcdR b a
    | b < 1e-5 = a
    | otherwise = gcdR (a-b) b

solve [a,b,c] = n * area0
  where
    norm ang = if ang < 0 then ang + 2 * pi else ang
    r = circleR a b c
    angA = norm (angle (b - a) (c - a)) * 2
    angB = norm (angle (c - b) (a - b)) * 2
    angC = norm (angle (a - c) (b - c)) * 2
    invN = angA `gcdR` angB `gcdR` angC
    n = 2 * pi / invN
    area0 = r^2 * (sin invN) / 2

main = interact $ printf "%.10f" . solve . map readComplex . take 3 . lines

import Data.Complex
import Text.Printf

readComplex :: String -> Complex Double
readComplex = (\[x,y] -> x :+ y) . map read . words

area a b = imagPart $ a * b

angleSin a b = area a b / (magnitude a * magnitude b)

angle a b = phase (a * conjugate b)

circleR a b c = magnitude (b - c) / angleSin (b - a) (c - a) / 2

gcdR a b
    | a < 0 || b < 0 = gcdR (abs a) (abs b)
    | a < b = gcdR b a
    | b < 1e-5 = a
    | otherwise = gcdR (a-b) b

solve [a,b,c] = n * area0
  where
    norm ang = if ang < 0 then ang + 2 * pi else ang
    r = circleR a b c
    angA = norm (angle (b - a) (c - a)) * 2
    angB = norm (angle (c - b) (a - b)) * 2
    angC = norm (angle (a - c) (b - c)) * 2
    invN = angA `gcdR` angB `gcdR` angC
    n = 2 * pi / invN
    area0 = r^2 * sin invN / 2

main = interact $ printf "%.10f" . solve . map readComplex . take 3 . lines

import Data.List

main :: IO ()
main = interact $ show . solve . map (map read . words) . lines

solve :: [[Float]] -> Float
solve [[x1, y1], [x2, y2], [x3, y3]] = sides * rsquare * sin (2 * pi / sides) / 2
  where
    a1 = 2 * (x2 - x1)
    b1 = 2 * (y2 - y1)
    c1 = x1**2 - x2**2 + y1**2 - y2**2
    a2 = 2 * (x3 - x1)
    b2 = 2 * (y3 - y1)
    c2 = x1**2 - x3**2 + y1**2 - y3**2
    x = (b1 * c2 - b2 * c1) / (a1 * b2 - a2 * b1)
    y = (c1 * a2 - c2 * a1) / (a1 * b2 - a2 * b1)
    dx1 = x1 - x
    dy1 = y1 - y
    dx2 = x2 - x
    dy2 = y2 - y
    dx3 = x3 - x
    dy3 = y3 - y
    angl1 = 2 * pi / (acos ((dx1 * dx2 + dy1 * dy2) / (sqrt ((dx1**2 + dy1**2) * (dx2**2 + dy2**2)))))
    angl2 = 2 * pi / (acos ((dx3 * dx2 + dy3 * dy2) / (sqrt ((dx3**2 + dy3**2) * (dx2**2 + dy2**2)))))
    angl3 = 2 * pi / (acos ((dx3 * dx1 + dy3 * dy1) / (sqrt ((dx3**2 + dy3**2) * (dx1**2 + dy1**2)))))
    sides = fromIntegral $ head $ filter (\n -> let m = fromIntegral n in allint (m / angl1, m / angl2, m / angl3)) ([3..] :: [Int])
    allint (a, b, c) = nearint a && nearint b && nearint c
    nearint a = abs (a - fromIntegral (round a :: Integer)) < 1e-4
    rsquare = (dx1**2 + dy1**2)
solve _ = undefined

module Main where

frem :: Double -> Double -> Double
frem x y = x - (y * (fromIntegral (truncate (x / y))))

fgcd :: Double -> Double -> Double
fgcd x y =  fgcd_aux (abs x) (abs y) where
	fgcd_aux a b | abs b <= 1e-8 = a
				 | otherwise = fgcd_aux b (frem a b)

distance :: (Double, Double) -> (Double, Double) -> Double
distance (x1, y1) (x2, y2) = sqrt ((x1 - x2) ^ 2 + (y1 - y2) ^ 2)

angle :: Double -> Double -> Double -> Double
angle d1 d2 d3 = acos ((d1 ^ 2 + d2 ^ 2 - d3 ^ 2) / (2 * d1 * d2))

radius :: Double -> Double -> Double
radius a alpha = a / (2 * sin alpha)

compute :: (Double, Double) -> (Double, Double) -> (Double, Double) -> Double
compute p1 p2 p3 = let
		a = distance p1 p2;
		b = distance p2 p3;
		c = distance p3 p1;
		alpha = angle b c a;
		beta = angle c a b;
		gamma = angle a b c;
		r = radius a alpha;
		u = 2 * fgcd alpha (fgcd beta gamma) in r ^ 2 * pi / u * sin u

main :: IO ()
main = do
	input <- getContents
	let tokens = words input;
		p1 = (read (tokens !! 0), read (tokens !! 1));
		p2 = (read (tokens !! 2), read (tokens !! 3));
		p3 = (read (tokens !! 4), read (tokens !! 5)) in
		putStrLn (show (compute p1 p2 p3))

module Main where

frem :: Float -> Float -> Float
frem x y = x - (y * (fromIntegral (truncate (x / y))))

fgcd :: Float -> Float -> Float
fgcd x y =  fgcd_aux (abs x) (abs y) where
	fgcd_aux a b | abs b < 1e-6  = a
				 | otherwise = fgcd_aux b (frem a b)

distance :: (Float, Float) -> (Float, Float) -> Float
distance (x1, y1) (x2, y2) = sqrt ((x1 - x2) ^ 2 + (y1 - y2) ^ 2)

angle :: Float -> Float -> Float -> Float
angle d1 d2 d3 = acos ((d1 ^ 2 + d2 ^ 2 - d3 ^ 2) / (2 * d1 * d2))

radius :: Float -> Float -> Float
radius a alpha = a / (2 * sin alpha)

compute :: (Float, Float) -> (Float, Float) -> (Float, Float) -> Float
compute p1 p2 p3 = let
		a = distance p1 p2;
		b = distance p2 p3;
		c = distance p3 p1;
		alpha = angle b c a;
		beta = angle c a b;
		gamma = angle a b c;
		r = radius a alpha;
		u = 2 * fgcd alpha (fgcd beta gamma) in r ^ 2 * pi / u * sin u

main :: IO ()
main = do
	input <- getContents
	let tokens = words input;
		p1 = (read (tokens !! 0), read (tokens !! 1));
		p2 = (read (tokens !! 2), read (tokens !! 3));
		p3 = (read (tokens !! 4), read (tokens !! 5)) in
		putStrLn (show (compute p1 p2 p3))

module Main where

frem :: Float -> Float -> Float
frem x y = x - (y * (fromIntegral (truncate (x / y))))

fgcd :: Float -> Float -> Float
fgcd x y =  fgcd_aux (abs x) (abs y) where
	fgcd_aux a b | abs b <= 1e-5  = a
				 | otherwise = fgcd_aux b (frem a b)

distance :: (Float, Float) -> (Float, Float) -> Float
distance (x1, y1) (x2, y2) = sqrt ((x1 - x2) ^ 2 + (y1 - y2) ^ 2)

angle :: Float -> Float -> Float -> Float
angle d1 d2 d3 = acos ((d1 ^ 2 + d2 ^ 2 - d3 ^ 2) / (2 * d1 * d2))

radius :: Float -> Float -> Float
radius a alpha = a / (2 * sin alpha)

compute :: (Float, Float) -> (Float, Float) -> (Float, Float) -> Float
compute p1 p2 p3 = let
		a = distance p1 p2;
		b = distance p2 p3;
		c = distance p3 p1;
		alpha = angle b c a;
		beta = angle c a b;
		gamma = angle a b c;
		r = radius a alpha;
		u = 2 * fgcd alpha (fgcd beta gamma) in r ^ 2 * pi / u * sin u

main :: IO ()
main = do
	input <- getContents
	let tokens = words input;
		p1 = (read (tokens !! 0), read (tokens !! 1));
		p2 = (read (tokens !! 2), read (tokens !! 3));
		p3 = (read (tokens !! 4), read (tokens !! 5)) in
		putStrLn (show (compute p1 p2 p3))

import Control.Arrow

main = do
  [ax,ay] <- readPoint
  [bx,by] <- readPoint
  [cx,cy] <- readPoint
  let d = 2*(ax*(by-cy)+bx*(cy-ay)+cx*(ay-by))
      dx = ((ay^2+ax^2)*(by-cy)+(by^2+bx^2)*(cy-ay)+(cy^2+cx^2)*(ay-by))/d
      dy = ((ay^2+ax^2)*(cx-bx)+(by^2+bx^2)*(ax-cx)+(cy^2+cx^2)*(bx-ax))/d
      aa = angle (bx-dx,by-dy) (cx-dx,cy-dy)
      ab = angle (cx-dx,cy-dy) (ax-dx,ay-dy)
      ac = angle (ax-dx,ay-dy) (bx-dx,by-dy)
      n = snd $ head $
          filter (isMultiple ac . fst) $
          filter (isMultiple ab . fst) $
          filter (isMultiple aa . fst) $
          map ((2*pi/) &&& id) [3..]
      r = sqrt ((ax-dx)^2 + (ay-dy)^2)
      a = n*r^2*sin(2*pi/n)/2
  print a

readPoint = fmap (map read . words) getLine
(a,b)·(c,d) = a*c+b*d
(a,b)×(c,d) = a*d-b*c
angle a b = abs (atan2 (a×b) (a·b))
isMultiple a b = abs (a - b*fromIntegral (round(a/b))) < pi/1000

import Control.Arrow

main = do
  [ax,ay] <- readPoint
  [bx,by] <- readPoint
  [cx,cy] <- readPoint
  let d = 2*(ax*(by-cy)+bx*(cy-ay)+cx*(ay-by))
      dx = ((ay^2+ax^2)*(by-cy)+(by^2+bx^2)*(cy-ay)+(cy^2+cx^2)*(ay-by))/d
      dy = ((ay^2+ax^2)*(cx-bx)+(by^2+bx^2)*(ax-cx)+(cy^2+cx^2)*(bx-ax))/d
      aa = angle (bx-dx,by-dy) (cx-dx,cy-dy)
      ab = angle (cx-dx,cy-dy) (ax-dx,ay-dy)
      ac = angle (ax-dx,ay-dy) (bx-dx,by-dy)
      n = snd $ head $
          filter (isMultiple ac . fst) $
          filter (isMultiple ab . fst) $
          filter (isMultiple aa . fst) $
          map ((2*pi/) &&& id) [3..]
      r = sqrt ((ax-dx)^2 + (ay-dy)^2)
      a = n*r^2*sin(2*pi/n)/2
  print a

readPoint = fmap (map read . words) getLine
(a,b)·(c,d) = a*c+b*d
(a,b)×(c,d) = a*d-b*c
angle a b = abs (atan2 (a×b) (a·b))
isMultiple a b = abs (a - b*fromIntegral (round(a/b))) < pi/100

import Control.Arrow

main = do
  [ax,ay] <- readPoint :: IO [Double]
  [bx,by] <- readPoint
  [cx,cy] <- readPoint
  let d = 2*(ax*(by-cy)+bx*(cy-ay)+cx*(ay-by))
      dx = ((ay^2+ax^2)*(by-cy)+(by^2+bx^2)*(cy-ay)+(cy^2+cx^2)*(ay-by))/d
      dy = ((ay^2+ax^2)*(cx-bx)+(by^2+bx^2)*(ax-cx)+(cy^2+cx^2)*(bx-ax))/d
      aa = angle (bx-dx,by-dy) (cx-dx,cy-dy)
      ab = angle (ax-dx,ay-dy) (cx-dx,cy-dy)
      ac = angle (ax-dx,ay-dy) (bx-dx,by-dy)
      n = snd $ head $
          filter (isMultiple ac . fst) $
          filter (isMultiple ab . fst) $
          filter (isMultiple aa . fst) $
          map ((2*pi/) &&& id) [3..]
      r = sqrt ((ax-dx)^2 + (ay-dy)^2)
      a = n*r^2*sin(2*pi/n)/2
  print a

readPoint = fmap (map read . words) getLine
(a,b)·(c,d) = a*c+b*d
(a,b)×(c,d) = a*d-b*c
angle a b = abs (atan2 (a×b) (a·b))
isMultiple a b = abs (a - b*fromIntegral (floor(a/b))) < pi/100

import Data.List
import Text.Printf

delta = 1e-6
isInteger x = abs (fromInteger (round x) - x) < delta

radius [[x1', y1'], [x2', y2'], [x3',y3']] =
	let {(x1, y1, x2, y2, x3, y3) = if abs(x2' - x1') < delta
		then (x1', y1', x3', y3', x2', y2')
		else if abs (x2' - x3') < delta then (x2', y2', x1', y1', x3', y3')
		else (x1', y1', x2', y2', x3', y3')} in
	let { ma = (y2 - y1)/(x2 - x1)
	; mb = (y3 - y2)/(x3 - x2)} in
	let x = (ma * mb * (y1 - y3) + mb * (x1 + x2) - ma * (x2 + x3)) / (2 * (mb - ma)) in
	let y = if abs ma > delta then -1 / ma * (x - (x1 + x2)/2) + (y1 + y2)/2
		else -1 / mb * (x - (x2 + x3)/2 ) + (y2 + y3)/2 in
	sqrt((x - x1)**2 + (y - y1)**2)

dist x1 y1 x2 y2 = sqrt ((x1 - x2)**2 + (y1 - y2)**2)

angles [[x1, y1], [x2, y2], [x3,y3]] r = let {
	d1 = dist x1 y1 x2 y2
	; d2 = dist x2 y2 x3 y3
	; d3 = dist x3 x1 y3 y1} in
	reverse $ (map ((2*) . asin . (/(2*r))) $ tail $ reverse $ sort [d1, d2, d3])

s::[[Double]] -> Double
s coords = let {r = radius coords} in
	let {[n] = take 1 $ filter (\x -> any isInteger $ map (/(2* pi / fromInteger x)) as) [3..100]
		where as = angles coords r}
	in let {a = pi / (fromInteger n)}
	in r ** 2 * (sin a) * (cos a) * (fromInteger n)

main = do {
	coords <- mapM (\_ -> getLine >>= (return . map read . words)) [1..3]
	; printf "%.6f" $ s coords
}

data Vector = Vector Float Float deriving (Show)

data Point = Point Float Float deriving (Show)

eps = 1e-3
instance Eq Point where
	(Point x1 y1) == (Point x2 y2) = (abs (x1 - x2)) < eps && (abs (y1 - y2)) < eps

getPoint = do
	l <- getLine
	let [x, y] = map read (words l)
	return (Point x y)

vector (Point x1 y1) (Point x2 y2) = Vector (x2 - x1) (y2 - y1)
normal (Vector x y) = Vector (-y) x
cross (Vector x1 y1) (Vector x2 y2) = x1*y2 - x2*y1
add' (Point x1 y1) (Vector x2 y2) = Point (x1 + x2) (y1 + y2)
div' (Vector x y) f = Vector (x / f) (y / f)
mul' (Vector x y) f = Vector (x * f) (y * f)
sub' (Point x1 y1) (Point x2 y2) = Point (x1 - x2) (y1 - y2)

rotate (Point x y) a = Point (x * cos a - y * sin a) (x * sin a + y * cos a)

match n ps =
	let p = head ps in
	length (filter (\p -> p `elem` ps) [rotate p (2*pi*i / n) | i <- [0..n-1]]) == length ps

main = do
	p1 <- getPoint
	p2 <- getPoint
	p3 <- getPoint

	let
		an = normal (vector p1 p2)
		b = vector p2 p3
		bn = normal b
		c = vector p1 p3
		s = (an `cross` c) / (bn `cross` an)

		p0 = p2 `add'` (b `div'` 2) `add'` ((bn `div'` 2) `mul'` s)

		ps = map (\p -> p `sub'` p0) [p1, p2, p3]

		p = head ps

		n = head (filter (\n -> match n ps) [3..100])

		rr = x*x + y*y  where Point x y = ps !! 0

	print $ n*rr*sin(2*pi/n) / 2

module Main where

import Control.Monad
import Control.DeepSeq
import Data.Function
import Data.Ratio
import Data.List
import Data.Char

--import Debug.Trace

data LDouble = LDouble Double Double deriving (Eq, Show)

stablize (LDouble a b) = LDouble a'' b'' where
    eps = 1e-7
    (a', b') = if b > eps then (a + eps, b - eps) else if b < -eps then (a - eps, b + eps) else (a, b)
    falseSig = signum a' /= 0 && signum b' /= 0 && signum b' /= signum a'
    (a'', b'') = if falseSig then (a' + 2*b', -b') else (a', b')

unaryOp f (LDouble a b) = LDouble (f a) (f b)
binaryOp f (LDouble a1 b1) (LDouble a2 b2) = LDouble (f a1 a2) (f b1 b2)
binaryBoolOp f (LDouble a1 b1) (LDouble a2 b2) = if a1 == a2 then f b1 b2 else f a1 a2

toDouble :: LDouble -> Double
toDouble (LDouble a b) = a + b
fromDouble :: Double -> LDouble
fromDouble x = stablize (LDouble x 0)

instance Num LDouble where
    x + y = stablize $ binaryOp (+) x y
    x * y = stablize $ binaryOp (*) x y
    abs = unaryOp abs
    signum (LDouble a b) = LDouble (signum a) 0
    negate (LDouble a b) = LDouble (negate a) (negate b)
    fromInteger n = LDouble (fromInteger n) 0

instance Fractional LDouble where
    (LDouble a b) / (LDouble c d) = stablize $ LDouble (a / (c + d)) (b / (c + d))
    fromRational x = fromDouble (fromIntegral (numerator x) / fromIntegral (denominator x))

instance Ord LDouble where
    compare x y = if x == y then EQ else if x < y then LT else GT
    (<) = binaryBoolOp (<)
    (<=) = binaryBoolOp (<=)
    (>) = binaryBoolOp (>)
    (>=) = binaryBoolOp (>=)

instance Read LDouble where
    readsPrec n = convert . doubleReadsPrec where
        doubleReadsPrec = readsPrec n :: String -> [(Double, String)]
        convert = map (\(x, s) -> (fromDouble x, s))

doubleFn :: (Double -> Double) -> (LDouble -> LDouble)
doubleFn f = fromDouble . f . toDouble

instance Floating LDouble where
    pi = fromDouble pi
    exp = doubleFn exp
    log = doubleFn log
    sqrt = doubleFn sqrt
    sin = doubleFn sin
    cos = doubleFn cos
    tan = doubleFn tan
    asin = doubleFn asin
    acos = doubleFn acos
    atan = doubleFn atan
    sinh = doubleFn sinh
    cosh = doubleFn cosh
    tanh = doubleFn tanh
    asinh = doubleFn asinh
    acosh = doubleFn acosh
    atanh = doubleFn atanh

type Point = (LDouble, LDouble)
type Vector = (LDouble, LDouble)

sameDouble :: LDouble -> LDouble -> Bool
sameDouble a b = -1e-6 <= a - b && a - b <= 1e-12

samePoint ((x1, y1), (x2, y2)) = sameDouble x1 x2 && sameDouble y1 y2
dist (x1, y1) (x2, y2) = sqrt ((abs $ x1 - x2)**2 + (abs $ y1 - y2)**2)

add (x1, y1) (x2, y2) = (x1 + x2, y1 + y2)
halfVec (x1, y1) (x2, y2) = ((x2 - x1) / 2, (y2 - y1) / 2)
perpendic (x, y) = (y, -x)
scale k (x, y) = (k * x / l, k * y / l) where
    l = dist (x, y) (0, 0)

centerAngle nPoly nInterval = 2 * pi * fromIntegral nInterval / fromIntegral nPoly

centerPos p1 p2 angle
    | angle > pi = centerPos p2 p1 (2*pi - angle)
    | sameDouble angle pi = p1 `add` halfVec p1 p2
    | otherwise = p1 `add` c_ `add` h_ where
        c = dist p1 p2
        c_ = halfVec p1 p2
        h = c * tan (angle/2) / 2
        h_ = scale h $ perpendic c_

getArea r nPoly = triangleArea * fromIntegral nPoly where
    theta = centerAngle nPoly 1
    triangleArea = r * r * sin theta / 2

tryFit :: (Point, Point, Point) -> Int -> LDouble
tryFit (p1,p2,p3) 200 = -1
tryFit (p1,p2,p3) nPoly = if equiangular then area else tryFit (p1,p2,p3) (nPoly+1) where
    center12 = map (\nInterval -> centerPos p1 p2 $ centerAngle nPoly nInterval) [1..(nPoly-1)]
    center13 = map (\nInterval -> centerPos p1 p3 $ centerAngle nPoly nInterval) [1..(nPoly-1)]
    centerCandidate = filter samePoint [ (c1, c2) | c1 <- center12, c2 <- center13 ]
    equiangular = length centerCandidate >= 1
    center = fst $ head centerCandidate
    area = getArea (dist p1 center) nPoly

process :: [Point] -> LDouble
process points = tryFit (p1,p2,p3) 4 where
    (p1:p2:[p3]) = points

getWords  = words <$> getLine :: IO [String]
getDoubles = map read <$> getWords :: IO [LDouble]
toPoint (x:[y]) = (x, y) :: Point

main = do
    points <- replicateM 3 (toPoint <$> getDoubles)
    print $ process points

module Main where

import Control.Monad
import Control.DeepSeq
import Data.Function
import Data.Ratio
import Data.List
import Data.Char

--import Debug.Trace

data LDouble = LDouble Double Double deriving Eq

stablize (LDouble a b) = LDouble a'' b'' where
    eps = 1e-7
    (a', b') = if b > eps then (a + eps, b - eps) else if b < -eps then (a - eps, b + eps) else (a, b)
    falseSig = signum a' /= 0 && signum b' /= 0 && signum b' /= signum a'
    (a'', b'') = if falseSig then (a' + 2*b', -b') else (a', b')

unaryOp f (LDouble a b) = LDouble (f a) (f b)
binaryOp f (LDouble a1 b1) (LDouble a2 b2) = LDouble (f a1 a2) (f b1 b2)
binaryBoolOp f (LDouble a1 b1) (LDouble a2 b2) = if a1 == a2 then f b1 b2 else f a1 a2

toDouble :: LDouble -> Double
toDouble (LDouble a b) = a + b
fromDouble :: Double -> LDouble
fromDouble x = stablize (LDouble x 0)

instance Show LDouble where
    show = show . toDouble

instance Num LDouble where
    x + y = stablize $ binaryOp (+) x y
    x * y = stablize $ binaryOp (*) x y
    abs = unaryOp abs
    signum (LDouble a b) = LDouble (signum a) 0
    negate (LDouble a b) = LDouble (negate a) (negate b)
    fromInteger n = LDouble (fromInteger n) 0

instance Fractional LDouble where
    (LDouble a b) / (LDouble c d) = stablize $ LDouble (a / (c + d)) (b / (c + d))
    fromRational x = fromDouble (fromIntegral (numerator x) / fromIntegral (denominator x))

instance Ord LDouble where
    compare x y = if x == y then EQ else if x < y then LT else GT
    (<) = binaryBoolOp (<)
    (<=) = binaryBoolOp (<=)
    (>) = binaryBoolOp (>)
    (>=) = binaryBoolOp (>=)

instance Read LDouble where
    readsPrec n = convert . doubleReadsPrec where
        doubleReadsPrec = readsPrec n :: String -> [(Double, String)]
        convert = map (\(x, s) -> (fromDouble x, s))

doubleFn :: (Double -> Double) -> (LDouble -> LDouble)
doubleFn f = fromDouble . f . toDouble

instance Floating LDouble where
    pi = fromDouble pi
    exp = doubleFn exp
    log = doubleFn log
    sqrt = doubleFn sqrt
    sin = doubleFn sin
    cos = doubleFn cos
    tan = doubleFn tan
    asin = doubleFn asin
    acos = doubleFn acos
    atan = doubleFn atan
    sinh = doubleFn sinh
    cosh = doubleFn cosh
    tanh = doubleFn tanh
    asinh = doubleFn asinh
    acosh = doubleFn acosh
    atanh = doubleFn atanh

type Point = (LDouble, LDouble)
type Vector = (LDouble, LDouble)

sameDouble :: LDouble -> LDouble -> Bool
sameDouble a b = -1e-6 <= a - b && a - b <= 1e-12

samePoint ((x1, y1), (x2, y2)) = sameDouble x1 x2 && sameDouble y1 y2
dist (x1, y1) (x2, y2) = sqrt ((abs $ x1 - x2)**2 + (abs $ y1 - y2)**2)

add (x1, y1) (x2, y2) = (x1 + x2, y1 + y2)
halfVec (x1, y1) (x2, y2) = ((x2 - x1) / 2, (y2 - y1) / 2)
perpendic (x, y) = (y, -x)
scale k (x, y) = (k * x / l, k * y / l) where
    l = dist (x, y) (0, 0)

centerAngle nPoly nInterval = 2 * pi * fromIntegral nInterval / fromIntegral nPoly

centerPos p1 p2 angle
    | angle > pi = centerPos p2 p1 (2*pi - angle)
    | sameDouble angle pi = p1 `add` halfVec p1 p2
    | otherwise = p1 `add` c_ `add` h_ where
        c = dist p1 p2
        c_ = halfVec p1 p2
        h = c * tan (angle/2) / 2
        h_ = scale h $ perpendic c_

getArea r nPoly = triangleArea * fromIntegral nPoly where
    theta = centerAngle nPoly 1
    triangleArea = r * r * sin theta / 2

tryFit :: (Point, Point, Point) -> Int -> LDouble
tryFit (p1,p2,p3) 200 = -1
tryFit (p1,p2,p3) nPoly = if equiangular then area else tryFit (p1,p2,p3) (nPoly+1) where
    center12 = map (\nInterval -> centerPos p1 p2 $ centerAngle nPoly nInterval) [1..(nPoly-1)]
    center13 = map (\nInterval -> centerPos p1 p3 $ centerAngle nPoly nInterval) [1..(nPoly-1)]
    centerCandidate = filter samePoint [ (c1, c2) | c1 <- center12, c2 <- center13 ]
    equiangular = length centerCandidate >= 1
    center = fst $ head centerCandidate
    area = getArea (dist p1 center) nPoly

process :: [Point] -> LDouble
process points = tryFit (p1,p2,p3) 4 where
    (p1:p2:[p3]) = points

getWords  = words <$> getLine :: IO [String]
getDoubles = map read <$> getWords :: IO [LDouble]
toPoint (x:[y]) = (x, y) :: Point

main = do
    points <- replicateM 3 (toPoint <$> getDoubles)
    print $ process points

dist ( [x0,y0], [x1,y1] ) = sqrt ( ( x1 - x0 )^2 + ( y1 - y0 )^2 )
angle (a,b,c) = acos ( ( c^2 + b^2 - a^2 ) / 2 / b / c )
isInteger x = abs ( x - fromIntegral ( round x ) ) <= 1e-5

solve [p0,p1,p2] =
	let
		[a,b,c] = map dist [ (p0,p1), (p1,p2), (p2,p0) ]
		[x,y,z] = map angle [ (a,b,c), (b,c,a), (c,a,b) ]
		r = a / 2 / sin x
		good a = all isInteger $ map (/a) [x,y,z]
		q = head $ filter good $ map (pi/) [3..100]
	in
		r^2 * sin q * pi / q

main = interact $ show . solve . map ( map read . words ) . lines

import Text.Printf

dist ( [x0,y0], [x1,y1] ) = sqrt ( ( x1 - x0 )^2 + ( y1 - y0 )^2 )

angle (a,b,c) = acos ( ( c^2 + b^2 - a^2 ) / ( 2 * b * c ) )

a `fmod` b = a - b * ( fromIntegral . round $ a / b )
fgcd a b = if b < pi / 100 then a else fgcd b ( a `fmod` b )

solve :: [[Double]] -> Double
solve pts =
	let
		dists = ( \[a,b,c] -> map dist [ (a,b), (b,c), (c,a) ] ) pts
		angles = ( \[a,b,c] -> map angle [ (a,b,c), (b,c,a), (c,a,b) ] ) dists
		r = ( head dists ) / ( 2 * sin ( head angles ) )
		q = 2 * foldl1 fgcd angles
	in
		r^2 * ( sin q ) * pi / q

main = interact $ printf "%.9f" . solve . map ( map read . words ) . lines

import Text.Printf

dist ( [x0,y0], [x1,y1] ) = sqrt ( ( x1 - x0 )^2 + ( y1 - y0 )^2 )

angle (a,b,c) = acos ( ( c^2 + b^2 - a^2 ) / ( 2 * b * c ) )

a `fmod` b = a - b * ( fromIntegral . round $ a / b )
fgcd a b = if b < pi / 105 then a else fgcd b ( a `fmod` b )

solve :: [[Double]] -> Double
solve pts =
	let
		dists = ( \[a,b,c] -> map dist [ (a,b), (b,c), (c,a) ] ) pts
		angles = ( \[a,b,c] -> map angle [ (a,b,c), (b,c,a), (c,a,b) ] ) dists
		r = ( head dists ) / ( 2 * sin ( head angles ) )
		q = 2 * foldl1 fgcd angles
	in
		r^2 * ( sin q ) * pi / q

main = interact $ printf "%.9f" . solve . map ( map read . words ) . lines

import Data.List.Split(splitWhen)
import Data.Char
import Data.List
import Text.Printf

type Point = (Double, Double)

-- Return sqr of 3 edges, sorted
computeEdges:: Point->Point->Point->[Double]
computeEdges (x1, y1) (x2, y2) (x3, y3)
        = sort [sqrE1, sqrE2, sqrE3]
            where sqrE1 = (x1 - x2) ^ 2 + (y1 - y2) ^2
                  sqrE2 = (x1 - x3) ^ 2 + (y1 - y3) ^2
                  sqrE3 = (x3 - x2) ^ 2 + (y3 - y2) ^2

-- Get m th point of a n edges regular polygon. diameter = 1
getMthPoint:: Int->Int->Point
getMthPoint n m =
        (cos a, sin a)
            where a = 2*pi/(fromIntegral n)*(fromIntegral m)

-- Get all possible edges (e1^2, e2^2, e3^2) from
-- 3 points in a n-edges regular polygon. diameter = 1
allPossibleEdges::Int->[[Double]]
allPossibleEdges n = [computeEdges (1.0, 0.0) (getMthPoint n m2) (getMthPoint n m3) | m2<-[1..n `div` 2], m3<-[m2+1..n-1]]

-- If the 2 given triangles are similer return the ratio (^2), or Nothing
getSimilarRatioTriangle:: [Double]->[Double]->Maybe Double
getSimilarRatioTriangle es1 es2 =
    if maximum rs -  minimum rs < 1e-6
    then Just $ head rs
    else Nothing
         where rs = zipWith (/) es1 es2

-- The given triangle
es1 = computeEdges (0, 0) (1, 1) (0, 1)

computeArea:: Int -> Double
computeArea n = nd * 0.5 * (sin $ 2* pi / nd)
                where nd = fromIntegral n

getSimilarRatio:: [Double]->Int->Maybe Double
getSimilarRatio es1 n =
    if null result
    then Nothing
    else head result
    where result = dropWhile (==Nothing) $ map (getSimilarRatioTriangle es1) (allPossibleEdges n)

{-getArea:: [Double]->Int->Maybe Double
getArea es1 n =
        (*area) <$> ratio
        where area = computeArea n
              ratio = getSimilarRatio es1 n-}

main = do
    c <- getContents
    let i = splitWhen isSpace c
    let j = map read i ::[Double]
    let es1 = computeEdges (j!!0, j!!1) (j!!2, j!!3) (j!!4, j!!5)
    --let result = head $ dropWhile (==Nothing) $ map (getArea es1) [3..100]
    let result = Just 1 :: Maybe Double
    (\(Just x)->printf "%.6f" $ x) result