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.Arrays;
import java.util.Scanner;

public class P01C
{
	public static void main(String[] args)
	{
		Scanner in = new Scanner(System.in);
		double[] x = new double[3];
		double[] y = new double[3];
		for (int i = 0; i < 3; i++) {
			x[i] = in.nextDouble();
			y[i] = in.nextDouble();
		}
		
		if (y[0] == y[1]) {
			y[1] = y[2];
			y[2] = y[0];
			double temp = x[1];
			x[1] = x[2];
			x[2] = temp;
		}
		else if (y[1] == y[2]) {
			y[1] = y[0];
			y[0] = y[2];
			double temp = x[1];
			x[1] = x[0];
			x[0] = temp;
		}
		double slope = perpendicular(slope(x[0], y[0], x[1], y[1]));
		double midX = (x[0] + x[1]) / 2;
		double midY = (y[0] + y[1]) / 2;
		Line line1 = getLine(slope, midX, midY);
		slope = perpendicular(slope(x[1], y[1], x[2], y[2]));
		midX = (x[1] + x[2]) / 2;
		midY = (y[1] + y[2]) / 2;
		Line line2 = getLine(slope, midX, midY);
		Point o = intersection(line1, line2);
		//System.out.println(o.x + " " + o.y);
		/*
		double slope = perpendicular(slope(x[0], y[0], x[1], y[1]));
		double midX = (x[0] + x[1]) / 2;
		double midY = (y[0] + y[1]) / 2;
		//System.out.println(midX);
		Line line = getLine(slope, midX, midY);
		//System.out.println(line.m + " " + line.b);
		double u = (x[2] * x[2] + y[2] * y[2] - x[0] * x[0] - y[0] * y[0]) / 2;
		//System.out.println(u);
		double ox, oy;
		if (line.m == Double.MAX_VALUE) {
			ox = line.b;
			oy = u - (x[2] - x[0]) * ox;
			oy /= y[2] - y[0];
		}
		else {
			if (x[0] == x[2]) {
				oy = u / (y[2] - y[0]);
				ox = (oy - line.b) / line.m;
			}
			else if (y[2] == y[0]) {
				ox = u / (x[2] - x[0]);
				oy = line.m * ox + line.b;
			}
			else {
				ox = u + y[2] * y[2] - y[2] * y[0];
				ox /= (y[2] - y[0]) * line.m + x[2] - x[0];
				oy = line.m * ox + line.b;
			}
		}
		//System.out.println(ox + " " + oy);
		*/
		double r = 0;
		for (int i = 0; i < 3; i++)
			r += Math.sqrt((x[i] - o.x) * (x[i] - o.x) + (y[i] - o.y) * (y[i] - o.y));
		r /= 3;
		
		double[] angle = new double[3];
		for (int i = 0; i < 3; i++)
			angle[i] = Math.atan2(y[i] - o.y, x[i] - o.x);
		Arrays.sort(angle);
		//System.out.println(Arrays.toString(angle));
		double[] angDiff = new double[3];
		for (int i = 0; i < 3; i++) {
			double a1 = angle[i];
			double a2 = angle[(i + 1) % 3];
			angDiff[i] = (a2 + Math.PI * 2 - a1) % (Math.PI * 2);
		}
		//System.out.println(Arrays.toString(angDiff));
		double gcd = angDiff[0];
		gcd = GCD(Math.max(angDiff[1], gcd), Math.min(angDiff[1], gcd));
		gcd = GCD(Math.max(angDiff[2], gcd), Math.min(angDiff[2], gcd));
		//System.out.println(gcd);
		int n = (int) Math.round(Math.PI * 2 / gcd);
		//System.out.println(n);
		double a = Math.PI / n;
		double l = Math.sin(a) * r;
		double h = Math.cos(a) * r;
		double area = l * h * n;
		System.out.println(area);
		
		in.close();
	}
	
	public static double GCD(double a, double b)
	{
		if (a % b < 0.0001)
			return b;
		return GCD(b, a % b);
	}
	
	public static Point intersection(Line line1, Line line2)
	{
		double x = (line2.b - line1.b) / (line1.m - line2.m);
		double y = line1.m * x + line1.b;
		return new Point(x, y);
	}
	
	public static Line getLine(double slope, double x, double y)
	{
		if (slope == Double.MAX_VALUE)
			return new Line(slope, x);
		double b = y - x * slope;
		return new Line(slope, b);
	}
	
	public static double slope(double x1, double y1, double x2, double y2)
	{
		if (x1 == x2)
			return Double.MAX_VALUE;
		return (y2 - y1) / (x2 - x1);
	}
	
	public static double perpendicular(double slope)
	{
		if (slope == Double.MAX_VALUE)
			return 0;
		if (slope == 0)
			return Double.MAX_VALUE;
		return -1 / slope;
	}
	
	public static class Point
	{
		double x;
		double y;
		
		public Point(double a, double b)
		{
			x = a;
			y = b;
		}
	}
	
	public static class Line // y = mx + b
	{
		double m;
		double b;
		
		public Line(double x, double y)
		{
			m = x;
			b = y;
		}
	}
}