Problem: The configuration of three circles packed inside a triangle such that each circle is tangent to the other two circles and to two of the edges of the triangle has been studied by many mathematicians for more than two centuries. Existence and uniqueness of such circles for an arbitrary triangle are easy to prove. Many methods of numerical calculation or geometric construction of such circles from an arbitrarily given triangle have been discovered. Today, such circles are called the Malfatti circles.

Figure 7 illustrates an example. The Malfatti circles of the triangle with the vertices (20, 80), (-40, -20) and (120, -20) are approximately

* the circle with the center (24.281677, 45.219486) and the radius 21.565935,
* the circle with the center (3.110950, 4.409005) and the radius 24.409005, and
* the circle with the center (54.556724, 7.107493) and the radius 27.107493.



Figure 8 illustrates another example. The Malfatti circles of the triangle with the vertices (20, -20), (120, -20) and (-40, 80) are approximately

* the circle with the center (25.629089, −10.057956) and the radius 9.942044,
* the circle with the center (53.225883, −0.849435) and the radius 19.150565, and
* the circle with the center (19.701191, 19.203466) and the radius 19.913790.



Your mission is to write a program to calculate the radii of the Malfatti circles of the given triangles.

<image>



Input

The input is a sequence of datasets. A dataset is a line containing six integers x1, y1 , x2 , y2, x3 and y3 in this order, separated by a space. The coordinates of the vertices of the given triangle are (x1 , y1 ), (x2 , y2 ) and (x3 , y3 ), respectively. You can assume that the vertices form a triangle counterclockwise. You can also assume that the following two conditions hold.

* All of the coordinate values are greater than −1000 and less than 1000.
* None of the Malfatti circles of the triangle has a radius less than 0.1.



The end of the input is indicated by a line containing six zeros separated by a space.

Output

For each input dataset, three decimal fractions r1 , r2 and r3 should be printed in a line in this order separated by a space. The radii of the Malfatti circles nearest to the vertices with the coordinates (x1 , y1 ), (x2 , y2 ) and (x3 , y3 ) should be r1 , r2 and r3 , respectively.

None of the output values may have an error greater than 0.0001. No extra character should appear in the output.

Example

Input

20 80 -40 -20 120 -20
20 -20 120 -20 -40 80
0 0 1 0 0 1
0 0 999 1 -999 1
897 -916 847 -972 890 -925
999 999 -999 -998 -998 -999
-999 -999 999 -999 0 731
-999 -999 999 -464 -464 999
979 -436 -955 -337 157 -439
0 0 0 0 0 0


Output

21.565935 24.409005 27.107493
9.942044 19.150565 19.913790
0.148847 0.207107 0.207107
0.125125 0.499750 0.499750
0.373458 0.383897 0.100456
0.706768 0.353509 0.353509
365.638023 365.638023 365.601038
378.524085 378.605339 378.605339
21.895803 22.052921 5.895714

Solution (in CPP):

Solution:
#include <iostream>
#include <cmath>
#include <complex>
#include <vector>
#include <iomanip>
#include <cassert>
using namespace std;

typedef complex<double> P;
#define REP(i,n) for(int i=0; i<n; ++i)
#define EPS 1e-12

struct L : public vector<P> {
  L(const P &a, const P &b) {
    push_back(a); push_back(b);
  }
};

double dot(const P& a, const P& b) {
  return real(conj(a)*b);
}

double cross(const P& a, const P& b) {
  return imag(conj(a)*b);
}

P projection(const L &l, const P &p) {
  double t = dot(p-l[0], l[0]-l[1]) / norm(l[0]-l[1]);
  return l[0] + t*(l[0]-l[1]);
}

bool intersectSP(const L &s, const P &p) {
  return abs(s[0]-p)+abs(s[1]-p)-abs(s[1]-s[0]) < EPS; // triangle inequality
}

double distanceSP(const L &s, const P &p) {
  const P r = projection(s, p);
  if (intersectSP(s, r)) return abs(r - p);
  return min(abs(s[0] - p), abs(s[1] - p));
}

P crosspoint(const L &l, const L &m) {
  double A = cross(l[1] - l[0], m[1] - m[0]);
  double B = cross(l[1] - l[0], l[1] - m[0]);
  if (abs(A) < EPS && abs(B) < EPS) return m[0]; // same line
  if (abs(A) < EPS) assert(false); // !!!PRECONDITION NOT SATISFIED!!!
  return m[0] + B / A * (m[1] - m[0]);
}

P rotateP(P a, P b, double rad)
{
	double x0=a.real(), x=b.real();
	double y0=a.imag(), y=b.imag();
	double xx=x0+(x-x0)*cos(rad)-(y-y0)*sin(rad);
	double yy=y0+(x-x0)*sin(rad)+(y-y0)*cos(rad);
	
	return P(xx,yy);
}

P a[3], Cp[3];
double Cr[3];

bool putC(int n, L fl)
{
	double rad=arg( (a[(n+2)%3]-a[n]) / (a[(n+1)%3]-a[n]) );
	rad/=2.0;
	
	P d=rotateP(a[n], a[(n+1)%3], rad);	
	P c = crosspoint(fl, L(a[n], d));
	
	if(abs(a[n]-c) < EPS) c=d;
	
	P hi=c, lo=a[n], mi;
	while(abs(hi-lo) > EPS)
	{
		mi=(hi+lo)/2.0;
		double r=distanceSP(L(a[n], a[(n+1)%3]) , mi);
		if(abs(Cp[0]-mi) < r+Cr[0]) hi=mi;
		else lo=mi;
	}
	
	Cr[n]=distanceSP(L(a[n], a[(n+1)%3]), mi);
	Cp[n]=mi;
	
	if(n==2)
	{
		if(abs(Cp[2]-Cp[1]) > Cr[2]+Cr[1]) return false;
		return true;
	}
	
	return putC(n+1, fl);
}

int main()
{
	
	cout << setiosflags(ios::fixed) << setprecision(5);
	while(1)
	{
		bool e=true;
		REP(i,3)
		{
			double x,y;
			cin >> x >> y;
			
			a[i]=P(x,y);
			
			if(x||y) e=false;
		}
		if(e) break;
		
		double rad=arg( (a[2]-a[0]) / (a[1]-a[0]) );
		rad/=2.0;
		P d=rotateP(a[0], a[1], rad);
		
		double rad2=arg( (a[1]-a[2]) / (a[0]-a[2]) );
		rad2/=2.0;
		P g=rotateP(a[2], a[0], rad2);
		
		P c = crosspoint(L(a[2], g), L(a[0], d));
		if(abs(a[0]-c) < EPS) c=d;
		
		P hi=c, lo=a[0];
		while(abs(hi-lo) > EPS)
		{
			P mi=(hi+lo)/2.0;
			
			Cr[0]=distanceSP(L(a[0], a[1]), mi);
			Cp[0]=mi;
			
			bool ret=putC(1, L(a[0], c));
			
			if(!ret) hi=mi;
			else lo=mi;
		}
		cout << Cr[0] << " " << Cr[1] << " " << Cr[2] << endl;
	}
}