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 CPP):

Solution:
#include <bits/stdc++.h>
using namespace std;
template <class T>
T abs(T x) {
  return x > 0 ? x : -x;
}
const double pi = asin(1.0) * 2;
int n;
int m;
int cross(double x1, double y8687969, double x2, double y2, double x3,
          double y3, double x4, double y4, double *xc, double *yc) {
  double a = x2 - x1;
  double b = x3 - x4;
  double c = x3 - x1;
  double d = y2 - y8687969;
  double e = y3 - y4;
  double f = y3 - y8687969;
  double t = (c * e - b * f) / (a * e - b * d);
  *xc = x1 + (x2 - x1) * t;
  *yc = y8687969 + (y2 - y8687969) * t;
  return 0;
}
double calc(double x1, double y8687969, double x2, double y2) {
  double ang = atan2(y8687969, x1) - atan2(y2, x2);
  if (ang < -1e-6) ang += 2 * pi;
  return ang;
}
int main() {
  double x1, y8687969, x2, y2, x3, y3;
  scanf("%lf%lf%lf%lf%lf%lf", &x1, &y8687969, &x2, &y2, &x3, &y3);
  double d;
  if (fabs(x1 - x2) < 1e-6 && fabs(y8687969 - y2) < 1e-6) {
    d = sqrt((x3 - x1) * (x3 - x1) + (y3 - y8687969) * (y3 - y8687969));
    printf("%.10f\n", sqrt(3.0) * d * d / 4);
    return 0;
  }
  if (fabs(x1 - x3) < 1e-6 && fabs(y8687969 - y3) < 1e-6) {
    d = sqrt((x2 - x1) * (x2 - x1) + (y2 - y8687969) * (y2 - y8687969));
    printf("%.10f\n", sqrt(3.0) * d * d / 4);
    return 0;
  }
  if (fabs(x3 - x2) < 1e-6 && fabs(y3 - y2) < 1e-6) {
    d = sqrt((x3 - x1) * (x3 - x1) + (y3 - y8687969) * (y3 - y8687969));
    printf("%.10f\n", sqrt(3.0) * d * d / 4);
    return 0;
  }
  double cx1 = (x1 + x2) / 2;
  double cy1 = (y8687969 + y2) / 2;
  double cx2 = (x2 + x3) / 2;
  double cy2 = (y2 + y3) / 2;
  double dx1 = (x2 - x1);
  double dy1 = (y2 - y8687969);
  double dx2 = (x3 - x2);
  double dy2 = (y3 - y2);
  double xc, yc;
  cross(cx1, cy1, cx1 - dy1, cy1 + dx1, cx2, cy2, cx2 - dy2, cy2 + dx2, &xc,
        &yc);
  double a1 = calc(x1 - xc, y8687969 - yc, x2 - xc, y2 - yc);
  double a2 = calc(x2 - xc, y2 - yc, x3 - xc, y3 - yc);
  double a3 = calc(x3 - xc, y3 - yc, x1 - xc, y8687969 - yc);
  if (a1 + a2 + a3 > 3 * pi) {
    a1 = 2 * pi - a1;
    a2 = 2 * pi - a2;
    a3 = 2 * pi - a3;
  }
  double ans = 1e10;
  double r = sqrt((x1 - xc) * (x1 - xc) + (y8687969 - yc) * (y8687969 - yc));
  for (int i = 3; i <= 100; i++) {
    double a = 2 * pi / i;
    int i1 = -1, i2 = -1, i3 = -1;
    for (int j = 0; j <= i; j++) {
      if (fabs(a * j - a1) < 1e-6) i1 = j;
      if (fabs(a * j - a2) < 1e-6) i2 = j;
      if (fabs(a * j - a3) < 1e-6) i3 = j;
    }
    if (i1 != -1 && i2 != -1 && i3 != -1 && i1 + i2 + i3 == i) {
      double cur = sin(a) * r * r * i / 2;
      if (cur < ans) ans = cur;
    }
  }
  printf("%.10f\n", ans);
  return 0;
}