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;
const double EPS = 1e-2;
const double PI = acos(0.0) * 2.0;
typedef struct p {
  double first, second;
};
bool operator<(const p &a, const p &b) {
  if (abs(a.first - b.first) < EPS) {
    if (abs(a.second - b.second) < EPS) {
      return 0;
    } else
      return a.second < b.second;
  } else {
    return a.first < b.first;
  }
}
p make_p(double a, double b) {
  p temp;
  temp.first = a;
  temp.second = b;
  return temp;
}
double xm, ym, xm1, ym1;
bool d(double x1, double x2, double x3, double y1, double y2, double y3) {
  double det1 = (x2 * y3 - x3 * y2) - (x1 * y3 - x3 * y1) + (x1 * y2 - x2 * y1);
  if (det1 < 0.0) return 1;
  return 0;
}
bool cmp(const p &a, const p &b) {
  double x1, x2, x3, y1, y2, y3;
  x1 = xm1, y1 = ym1;
  x2 = xm, y2 = ym;
  x3 = a.first, y3 = a.second;
  double vx1 = x2 - x1, vx2 = x3 - x2;
  double vy1 = y2 - y1, vy2 = y3 - y2;
  double det1 = acos((vx1 * vx2 + vy1 * vy2) / (sqrt(vx1 * vx1 + vy1 * vy1) *
                                                sqrt(vx2 * vx2 + vy2 * vy2)));
  if (d(x1, x2, x3, y1, y2, y3)) det1 = -det1;
  x1 = xm1, y1 = ym1;
  x2 = xm, y2 = ym;
  x3 = b.first, y3 = b.second;
  vx1 = x2 - x1, vx2 = x3 - x2;
  vy1 = y2 - y1, vy2 = y3 - y2;
  double det2 = acos((vx1 * vx2 + vy1 * vy2) / (sqrt(vx1 * vx1 + vy1 * vy1) *
                                                sqrt(vx2 * vx2 + vy2 * vy2)));
  if (d(x1, x2, x3, y1, y2, y3)) det2 = -det2;
  return det1 < det2;
}
int main() {
  vector<p> v(3);
  cin >> v[0].first >> v[0].second;
  cin >> v[1].first >> v[1].second;
  cin >> v[2].first >> v[2].second;
  bool change = 1;
  while (change) {
    change = 0;
    set<p> s;
    for (int i = 0; i < v.size(); i++) {
      s.insert(v[i]);
    }
    int n = s.size();
    for (int i = 0; i < v.size(); i++) {
      for (int j = i + 1; j < v.size(); j++) {
        if (i == j) continue;
        for (int k = 0; k < v.size(); k++) {
          if (i == k || j == k) continue;
          double vx1, vx2, vy1, vy2;
          vx1 = v[j].first - v[i].first;
          vy1 = v[j].second - v[i].second;
          vx2 = v[k].first - v[j].first;
          vy2 = v[k].second - v[j].second;
          double al =
              acos((vx1 * vx2 + vy1 * vy2) /
                   (sqrt(vx1 * vx1 + vy1 * vy1) * sqrt(vx2 * vx2 + vy2 * vy2)));
          if (d(v[i].first, v[j].first, v[k].first, v[i].second, v[j].second,
                v[k].second))
            al = -al;
          vx1 = v[i].first - v[j].first;
          vy1 = v[i].second - v[j].second;
          double ang = acos((vx1) / (sqrt(vx1 * vx1 + vy1 * vy1)));
          if (vy1 < 0) ang = -ang;
          ang += 2 * PI;
          al = ang - al;
          double x = v[i].first, y = v[i].second;
          double l = sqrt(vx2 * vx2 + vy2 * vy2);
          x += cos(al) * l;
          if (abs(x) < EPS) x = 0.0;
          y += sin(al) * l;
          if (abs(y) < EPS) y = 0.0;
          s.insert(make_p(x, y));
        }
      }
    }
    if (s.size() != n) change = 1;
    v.clear();
    for (set<p>::iterator it = s.begin(); it != s.end(); it++) v.push_back(*it);
  }
  for (int i = 0; i < v.size(); i++) {
    xm += v[i].first;
    ym += v[i].second;
  }
  xm /= v.size();
  ym /= v.size();
  xm1 = xm - 1.0, ym1 = ym;
  sort(v.begin(), v.end(), cmp);
  v.push_back(v[0]);
  double s = 0;
  for (int i = 0; i < v.size() - 1; i++) {
    s += (v[i].first - v[i + 1].first) * (v[i].second + v[i + 1].second);
  }
  printf("%.6lf", abs(s) / 2.0);
  return 0;
}