Problem: Nowadays all circuses in Berland have a round arena with diameter 13 meters, but in the past things were different.

In Ancient Berland arenas in circuses were shaped as a regular (equiangular) polygon, the size and the number of angles could vary from one circus to another. In each corner of the arena there was a special pillar, and the rope strung between the pillars marked the arena edges.

Recently the scientists from Berland have discovered the remains of the ancient circus arena. They found only three pillars, the others were destroyed by the time.

You are given the coordinates of these three pillars. Find out what is the smallest area that the arena could have.

Input

The input file consists of three lines, each of them contains a pair of numbers –– coordinates of the pillar. Any coordinate doesn't exceed 1000 by absolute value, and is given with at most six digits after decimal point.

Output

Output the smallest possible area of the ancient arena. This number should be accurate to at least 6 digits after the decimal point. It's guaranteed that the number of angles in the optimal polygon is not larger than 100.

Examples

Input

0.000000 0.000000
1.000000 1.000000
0.000000 1.000000


Output

1.00000000

Solution (in JAVA):

Solution:
import static java.lang.Math.*;
import static java.util.Arrays.*;
import static java.util.Collections.reverse;
import static java.lang.Integer.*;
import static java.lang.Long.parseLong;
import java.util.*;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import java.awt.geom.*;
import java.io.*;

@SuppressWarnings("unchecked")
public class C {
    static final int INF = 1000000000;

    /*
     * ��n���
     * 
     * given the coordinates of 3 corner. 
     * Find out what is the smallest area that the arena could have.
     * 
     * Any coordinate doesn't exceed 1000 by absolute value, and is 
     * given with at most six digits after decimal point.
     */
    // Wrong answer on test 28  
    void solve() throws Exception {
        double x1 = DOUBLE();
        double y1 = DOUBLE();
        double x2 = DOUBLE();
        double y2 = DOUBLE();
        double x3 = DOUBLE();
        double y3 = DOUBLE();
        XY c = circle(x1, y1, x2, y2, x3, y3);
        XY[] a = new XY[] {new XY(x1-c.x, y1-c.y), new XY(x2-c.x, y2-c.y), new XY(x3-c.x, y3-c.y), };
        sort(a,new Comparator<XY>() {
            public int compare(XY o1, XY o2) {
                double cross=cross(o1,o2);
                if (cross==0) return 0;
                return cross>0?-1:1; // sort by counterclockwise
            }
        });

        double d1 = ang(a[0],a[1]);
        double d2 = ang(a[1],a[2]);
        double r2=r2(a[0]);
//        System.out.println("  center=" + c);
//        System.out.print("  d1=" + d1);
//        System.out.println("  d2=" + d2);
//        int MAX=10000000;
        int MAX=100;
        for (int n = 3; n <= MAX; n++) {
            double ang=2*PI/n;
            if (eq(round(d1/ang),d1/ang) && eq(round(d2/ang),d2/ang)) {
                System.out.println(n*r2*sin(ang)/2);
                return;
            }
        }
//        System.out.println(MAX*r2*sin(2*PI/MAX)/2);
        System.out.println("0.0"); // also ok, never here
    }
    
//    final static public double EPS = 1e-6; // 1e-6 will fail in this case... 
    final static public double EPS = 1e-5; 

    public static boolean eq(double x, double y) {
        return Math.abs(x - y) <= EPS;
    }

    double len(XY xy) {
        return hypot(xy.x, xy.y);
    }
    double dot(XY xy1, XY xy2) {
        return xy1.x*xy2.x + xy1.y*xy2.y;
    }
    double ang(XY xy1, XY xy2) {
        double l1=len(xy1), l2=len(xy2);
        if (l1==0 || l2==0) return 0;
        
        double cosine=dot(xy1,xy2)/l1/l2;
        if (cosine>1) {
            cosine=1;
        } else if (cosine<-1) {
            cosine=-1;
        }
        return acos(cosine);
    }
    
    double cross(XY xy1, XY xy2) {
        return xy1.x*xy2.y - xy1.y*xy2.x;
    }
    // r^2
    double r2(XY xy) {
        return xy.x*xy.x + xy.y*xy.y;
    }
    
    private XY circle(double x1, double y1, double x2, double y2, double x3, double y3) {
        // center line: -2Bx+2Ay=2C=-B(x1+x2)+A(y1+y2)
        double A1=y2-y1;
        double B1=-(x2-x1);
        double C1=-B1*(x1+x2)+A1*(y1+y2);
        
        double A2=y3-y2;
        double B2=-(x3-x2);
        double C2=-B2*(x3+x2)+A2*(y3+y2);
        
        XY center=intersect(-2*B1, 2*A1, C1, -2*B2, 2*A2, C2);
        return center;
    }
    
    XY intersect(double A1, double B1, double C1, double A2, double B2, double C2) {
        double det = A1*B2 - A2*B1;
        if (abs(det) <= 1e-9) {
            // Lines are parallel, 0 or inf intersections
            return null;
        } else {
            double x = (1.0*B2*C1 - 1.0*B1*C2)/det;
            double y = (1.0*A1*C2 - 1.0*A2*C1)/det;
            return new XY(x,y);
        }
    }
    
    class XY implements Comparable<XY> {
        double x;
        double y;

        public XY(double x, double y) {
            this.x = x;
            this.y = y;
        }

        public String toString() {
            return "(" + x + ", " + y + ")";
        }

        public int hashCode() {
            double M = 31, r = M + x;
            r = M * r + y;
            return (int) r;
        }

        public boolean equals(Object a) {
            if (a == null || getClass() != a.getClass())
                return false;
            XY o = (XY) a;
            return x == o.x && y == o.y;
        }

        public int compareTo(XY o) {
            // < : -1 smallest 1st
            if (x != o.x)
                return x < o.x ? -1 : 1;
            return y < o.y ? -1 : (y == o.y ? 0 : 1);
        }
    }
    
    static boolean onlineJudge;
    public static void main(String[] args) throws Exception {
        onlineJudge = System.getProperty("ONLINE_JUDGE") != null;
        boolean localTest = !onlineJudge && new File(testFilename).exists();
        long start = System.currentTimeMillis();

        if(!onlineJudge && redirectStdoutToFile) {
            String filename = "output.txt";
            System.out.println("NOTE: redirect stdout to file "+filename);
            System.setOut(new PrintStream(new FileOutputStream(filename),true));
        }

        if (!localTest) {
            in = new BufferedReader(new InputStreamReader(System.in));
            new C().solve();
        } else {
            in = new BufferedReader(new FileReader(testFilename));
            while(true) {
                new C().solve();
                if (LINE() == null) {
                    break;
                }
                System.out.println();
            }
        }

        if(!onlineJudge) System.out.println("\nTime taken: "+((System.currentTimeMillis()-start)/1000.0)+" sec");
    }

    static boolean printInput=false;
//    static boolean printInput=true; // print input case
  
    static boolean redirectStdoutToFile=false;
//    static boolean redirectStdoutToFile=true; // redirect all STDOUT to "output.txt"

    static String testFilename="c-test-in.txt";
  
    static BufferedReader in;
    static StringTokenizer inTok = new StringTokenizer("");

    static String LINE() throws IOException {
        String s=in.readLine();
        if (printInput) System.out.println(s);
        return s;
    }
    static String STR() throws IOException {
        while (!inTok.hasMoreTokens()) {
            String line = LINE();
            if (line == null) {
                return null;
            }
            inTok = new StringTokenizer(line);
        }
        return inTok.nextToken();
    }
    static int INT() throws IOException { return Integer.parseInt(STR()); }
    static long LONG() throws IOException { return Long.parseLong(STR()); }
    static double DOUBLE() throws IOException { return Double.parseDouble(STR()); }
}