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<iostream>
#include<cmath>
#include<iomanip>
using namespace std;
struct P{
	double x,y;
	double abs()
	{
		return hypot(x,y);
	}
	P operator+(P b)
	{
		return{x+b.x,y+b.y};
	}
	P operator-(P b)
	{
		return{x-b.x,y-b.y};
	}
};
P div(P a,P b)
{
	return{a.x/a.abs()+b.x/b.abs(),a.y/a.abs()+b.y/b.abs()};
}
double theta(P a,P b)
{
	double ret=atan2(b.y,b.x)-atan2(a.y,a.x);
	ret=abs(ret);
	if(ret>M_PI)ret=2*M_PI-ret;
	return ret;
}
P take(P a,P b,double x)
{
	P q=div(a,b);
	double t=theta(a,b);
	double k=x/q.abs()/sin(t/2);
	return{q.x*k,q.y*k};
}
double cross(P a,P b){return a.x*b.y-a.y*b.x;}
bool in(P a,P b,P c,P p)
{
	return cross(p-a,b-a)*cross(p-a,c-a)<=0
		&&cross(p-b,c-b)*cross(p-b,a-b)<=0
		&&cross(p-c,a-c)*cross(p-c,b-c)<=0;
}
double dis(P p,P a,P b)
{
	double t=theta(b-a,p-a);
	return sin(t)*(p-a).abs();
}
bool check(P a,P b,P c,double x)
{
	P ab=take(a-c,b-c,x)+c,bc=take(b-a,c-a,x)+a,ca=take(c-b,a-b,x)+b;
	if(!in(a,b,c,ab)||!in(a,b,c,bc)||!in(a,b,c,ca))return false;
	if(dis(ab,a,b)<x||dis(bc,b,c)<x||dis(ca,c,a)<x)return false;
	return (ab-bc).abs()>=2*x||(bc-ca).abs()>=2*x||(ca-ab).abs()>=2*x;
}
int main()
{
	P a,b,c;
	cin>>a.x>>a.y>>b.x>>b.y>>c.x>>c.y;
	double L=0,R=1e3;
	for(int i=0;i<100;i++)
	{
		double M=(L+R)/2;
		if(check(a,b,c,M))L=M;
		else R=M;
	}
	cout<<fixed<<setprecision(15)<<L<<endl;
}