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

public class Main {

	private static double gcd(double a, double b) {
		if (b < 0.05)
			return a;
		return gcd(b, a % b);
	}

	private static double flip(double a) {
		return Point.round((a + 180) % 360, 6);
	}

	public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);
		Point p1 = new Point(sc.nextDouble(), sc.nextDouble());
		Point p2 = new Point(sc.nextDouble(), sc.nextDouble());
		Point p3 = new Point(sc.nextDouble(), sc.nextDouble());
		Point mid = p1.midPoint(p2);
		sc.close();

		double radius = 0.0;
		{
			boolean foundDirection = false;
			boolean isSmaller = false;
			double movement = 1.0;
			double angle = Point.round((p1.angle(p2) + 90) % 360, 6);
			double d1, d2;
			while (true) {
				d1 = Point.round(mid.distance(p1), 7);
				d2 = Point.round(mid.distance(p3), 7);

				if ((Math.abs(d1 - d2) < 0.000001)) {
					radius = mid.distance(p1);
					break;
				}

				if (foundDirection) {
					if (isSmaller) {
						if (d1 > d2) {
							movement = Point.round(movement /= 2, 7);
							angle = flip(angle);
							isSmaller = false;
						}
					} else {
						if (d1 < d2) {
							movement = Point.round(movement /= 2, 7);
							angle = flip(angle);
							isSmaller = true;
						}
					}
					mid.move(angle, movement);
				} else {
					movement = 1 + ((int) Math.abs(d1 - d2) / 2);
					if (d1 < d2)
						isSmaller = true;
					mid.move(angle, 0.0001);
					double d3 = mid.distance(p3);
					mid.move(flip(angle), 0.0001);

					if (isSmaller) {
						if (d2 < d3)
							angle = flip(angle);
					} else {
						if (d2 > d3)
							angle = flip(angle);
					}
					foundDirection = true;
				}
			}
		}

		double min;
		{
			double angle1 = (Math.toDegrees(Math.atan2(p1.y - mid.y, p1.x
					- mid.x)
					- Math.atan2(p2.y - mid.y, p2.x - mid.x)) + 360) % 360;
			double angle2 = (Math.toDegrees(Math.atan2(p2.y - mid.y, p2.x
					- mid.x)
					- Math.atan2(p3.y - mid.y, p3.x - mid.x)) + 360) % 360;
			double angle3 = (Math.toDegrees(Math.atan2(p1.y - mid.y, p1.x
					- mid.x)
					- Math.atan2(p3.y - mid.y, p3.x - mid.x)) + 360) % 360;

			angle1 = Point.round(angle1, 4);
			angle2 = Point.round(angle2, 4);
			angle3 = Point.round(angle3, 4);

			if (angle1 < 0)
				angle1 += 360;
			if (angle2 < 0)
				angle2 += 360;
			if (angle3 < 0)
				angle3 += 360;
			if (angle1 > 180)
				angle1 = 360 - angle1;
			if (angle2 > 180)
				angle2 = 360 - angle2;
			if (angle3 > 180)
				angle3 = 360 - angle3;

			min = gcd(angle1, gcd(angle2, angle3));
		}

		double nd = Point.round(360.0 / min, 3);
		double init = nd;
		int factor = 1;

		while (nd % 1.0 > 0.1) {
			factor++;
			nd = init * factor;
		}
		int n = (int) (init * factor);

		double area = Math.sin(Math.toRadians(360.0 / n)) * n * radius * radius
				/ 2;
		System.out.println(area);
	}
}

class Point {
	double x, y;

	Point(double i, double j) {
		x = i;
		y = j;
	}

	double distance(Point other) {
		double xd = other.x - this.x;
		double yd = other.y - this.y;
		return Math.sqrt(xd * xd + yd * yd);
	}

	double angle(Point other) {
		double xd = this.x - other.x;
		double yd = this.y - other.y;
		double ret = Math.toDegrees(Math.atan2(yd, xd));
		return (ret + 360) % 360;
	}

	Point midPoint(Point other) {
		double xd = other.x - this.x;
		double yd = other.y - this.y;
		return new Point(this.x + xd / 2, this.y + yd / 2);
	}

	public static double round(double d, int p) {
		double t = Math.pow(10, p);
		d *= t;
		int i = (int) Math.round(d);
		return (double) i / t;
	}

	void move(double dir, double dist) {
		double xmove, ymove;
		if (dir == 90.0) {
			xmove = 0;
			ymove = dist;
		} else if (dir == 270) {
			xmove = 0;
			ymove = -1 * dist;
		} else {
			double rad = Math.toRadians(dir);
			double ratio = round(Math.tan(rad), 6);

			double v = (dist * dist) / (1 + (ratio * ratio));
			xmove = Math.sqrt(v);
			ymove = ratio * xmove;

			if (dir < 90) {
				xmove = Math.abs(xmove);
				ymove = Math.abs(ymove);
			} else if (dir < 180) {
				xmove = Math.abs(xmove) * -1;
				ymove = Math.abs(ymove);
			} else if (dir < 270) {
				xmove = Math.abs(xmove) * -1;
				ymove = Math.abs(ymove) * -1;
			} else {
				xmove = Math.abs(xmove);
				ymove = Math.abs(ymove) * -1;
			}

		}
		this.x = round(this.x + xmove, 7);
		this.y = round(this.y + ymove, 7);
	}
};