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 java.util.*;

public class Circus{
	public static double EPS = 1e-5;
	public static void main(String[] args){
		Scanner reader = new Scanner(System.in);
		Point[] p = new Point[3];
		
		for(int i = 0; i < 3; i++)
			p[i] = new Point(reader.nextDouble(), reader.nextDouble());
		
		Point m1a = (p[1].sub(p[0])).mult(.5).add(p[0]);
		Point m1b = (p[1].sub(p[0])).rot(Math.PI/2.).add(m1a);
		Point m2a = (p[1].sub(p[2])).mult(.5).add(p[2]);
		Point m2b = (p[1].sub(p[2])).rot(Math.PI/2.).add(m2a);
		
		Point c = intersect(m1a, m1b, m2a, m2b);
		
		for(int i = 0; i < 3; i++){
			p[i] = p[i].sub(c);
			p[i].a = p[i].ang();
			//System.out.println(p[i].a);
		}
		
		double r = p[0].mag();
		
		//System.out.println(m1a + " " + m1b + " " + m2a + " " + m2b + " " + c + " " + r);
		
		Arrays.sort(p);
		double offset = p[0].a;
		
		for(int i = 0; i < 3; i++){
			//System.out.println(p[i] + " " + Math.toDegrees(p[i].ang()));
			p[i] = p[i].rot(-offset);
			//System.out.println(p[i] + " " + Math.toDegrees(p[i].ang()));
		}
		
		Point[][] sol = new Point[101][101];
		int best = 101;
		//for(Point[] s:sol)Arrays.fill(sol, null);
		
		for(int i = 3; i <= 100; i++){
			int k = 0;

			double t = Math.PI*2./(double)i;
			
			for(int j = 0; j < i; j++){
				Point n = new Point(r, 0);
				n = n.rot(t*j);
				sol[i][j] = n;
			}
			
			boolean flag = true;
			for(int j = 0; j < 3; j++){
				//System.out.println(j + " " + Math.toDegrees(t) + " " + Math.toDegrees(p[j].ang()) + " " + Math.toDegrees((p[j].ang()%t)));
				//if(Math.abs(p[j].ang()%t) >= EPS){
				//	flag = false;
				//}
				if(!isInt(p[j].ang()/t)){
					//System.out.println(j + " " + Math.toDegrees(t) + " " + Math.toDegrees(p[j].ang()) + " " + (p[j].ang()/t));
					//double f = Math.floor(p[j].ang()/t);
					//System.out.println(p[j].ang()/t-f);
					flag = false;
				}
			}
			
			if(flag)
				best = Math.min(best, i);
		}
		
		//System.out.println(best);
		Point[] s = new Point[best];
		
		for(int i = 0; i < best; i++){
			s[i] = sol[best][i];
		}
		
		double ans = area(s);
		
		System.out.printf("%.07f\n", ans);
	}
	
	public static boolean isInt(double x){
		double f = Math.rint(x);
		return Math.abs(x-f) < EPS;
	}
	
	//Convex polygon area
	//Returns the area of the polygon defined by the points in p, using the sit and spin method
	public static double area(Point[] p){
		int n = p.length;
		double a = 0;
		for(int i = 0; i < n; i++){
			a += p[i].cross(p[(i+1)%n]);
		}
		return a/2;
	}
	
	//Line intersection
	//Returns the point at which AC intersects with BD
	static Point intersect(Point a, Point c, Point b, Point d){
		Point f = c.sub(a);
		Point g = d.sub(b);
		double L = 0;
		
		//H + L1F = L2G
		if(f.x == 0 && g.y == 0){
			return new Point(a.x, b.y);
		}else if(f.y == 0 && g.x == 0){
			return new Point(b.x, a.y);
		}else if(g.x == 0 || g.y == 0){ //Change to solve for L2
			Point h = b.sub(a);
			double w = g.x/f.x;
			double x = h.x/f.x;
			double y = g.y/f.y;
			double z = h.y/f.y;
			
			L = (z-x)/(w-y);
			return b.add(g.mult(L));
		}else{
			Point h = a.sub(b);
			double w = h.x/g.x;
			double x = f.x/g.x;
			double y = h.y/g.y;
			double z = f.y/g.y;
			
			L = (w-y)/(z-x);
			return a.add(f.mult(L));
		}
	}
	
	
	public static class Point implements Comparable<Point>{
		double x;
		double y;
		double a;
		public Point(double _x, double _y){
			x = _x;
			y = _y;
		}
		public Point sub(Point p){
			return new Point(x-p.x, y-p.y);
		}
		public Point add(Point p){
			return new Point(x+p.x, y+p.y);
		}
		public Point mult(double L){
			return new Point(x*L, y*L);
		}
		public double dot(Point p){
			return x*p.x + y*p.y;
		}
		public double cross(Point p){
			return x*p.y-y*p.x;
		}
		public double mag(){
			return Math.abs(Math.sqrt(x*x + y*y));
		}
		public double dis(Point p){
			return sub(p).mag();
		}
		public Point rot(double t){
			double c = Math.cos(t);
			double s = Math.sin(t);	
			return new Point(x*c-y*s, x*s+y*c);
		}
		public double ang(){
			double t = Math.atan2(y,x);
			if(t<0)
				t+=Math.PI*2;
			return t;
		}
		public int compareTo(Point p){
			return (int)Math.signum(a-p.a);
		}
		public String toString(){
			return String.format("(%.6f, %.6f)", x, y);//"("+x+", "+y+")";
		}
	}
}