Problem: Snuke received a triangle as a birthday present. The coordinates of the three vertices were (x_1, y_1), (x_2, y_2), and (x_3, y_3).

He wants to draw two circles with the same radius inside the triangle such that the two circles do not overlap (but they may touch). Compute the maximum possible radius of the circles.

Constraints

* 0 ≤ x_i, y_i ≤ 1000
* The coordinates are integers.
* The three points are not on the same line.

Input

The input is given from Standard Input in the following format:


x_1 y_1
x_2 y_2
x_3 y_3


Output

Print the maximum possible radius of the circles. The absolute error or the relative error must be at most 10^{-9}.

Examples

Input

0 0
1 1
2 0


Output

0.292893218813


Input

3 1
1 5
4 9


Output

0.889055514217

Solution (in CPP):

Solution:
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
#include <algorithm>

using namespace std;

double calc_radius(double l, double theta1, double theta2) {
  return l / (1 / tan(theta1 / 2) + 1 / tan(theta2 / 2) + 2);
}

double calc_distance(double x1, double y1, double x2, double y2) {
  const double dx = x2 - x1, dy = y2 - y1;
  return sqrt(dx * dx + dy * dy);
}

double calc_angle(double dx1, double dy1, double dx2, double dy2) {
  const double norm1 = sqrt(dx1 * dx1 + dy1 * dy1);
  const double norm2 = sqrt(dx2 * dx2 + dy2 * dy2);
  const double inner = dx1 * dx2 + dy1 * dy2;
  return acos(inner / (norm1 * norm2));
}

int main(int argc, char *argv[]) {
  // read inputs
  double xs[3], ys[3];
  for (int i = 0; i < 3; i++) {
    scanf("%lf %lf", &xs[i], &ys[i]);
  }

  double ls[3], ts[3];
  for (int i = 0; i < 3; i++) {
    ls[i] = calc_distance(xs[(i + 1) % 3], ys[(i + 1) % 3], xs[(i + 2) % 3],
                          ys[(i + 2) % 3]);
    ts[i] = calc_angle(xs[(i + 1) % 3] - xs[i], ys[(i + 1) % 3] - ys[i],
                       xs[(i + 2) % 3] - xs[i], ys[(i + 2) % 3] - ys[i]);
    // printf("i = %d, l = %lf, t = %lf\n", i, ls[i], ts[i]);
  }

  double rs[3], ans = 0;
  for (int i = 0; i < 3; i++) {
    rs[i] = calc_radius(ls[i], ts[(i + 1) % 3], ts[(i + 2) % 3]);
    ans = max(ans, rs[i]);
  }
  printf("%.15lf\n", ans);

  return 0;
}