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 <cstdio>
#include <iostream>
#include <vector>
#include <list>
#include <cmath>
#include <fstream>
#include <algorithm>
#include <string>
#include <queue>
#include <set>
#include <map>
#include <complex>
#include <iterator>
#include <cstdlib>
#include <cstring>
#include <sstream>

using namespace std;

#define EPS (1e-10)
#define EQ(a,b) (abs((a) - (b)) < EPS)
#define EQV(a,b) (EQ((a).real(),(b).real()) && EQ((a).imag(),(b).imag()))

typedef complex<double> P;
typedef pair<P,P> Edge;
typedef long long ll;

const double PI=4*atan(1.0);
const int MAX_SIZE = 10000;


// àÏ
double dot(P a, P b) {
  return (a.real() * b.real() + a.imag() * b.imag());
}
// OÏ
double cross(P a, P b) {
  return (a.real() * b.imag() - a.imag() * b.real());
}
// _cª¼üabãÉ é©È¢©
int is_point_on_line(P a, P b, P c) {
  return EQ( cross(b-a, c-a), 0.0 );
}
// 2¼üÌ¼s»è
int is_orthogonal(P a1, P a2, P b1, P b2) {
  return EQ( dot(a1-a2, b1-b2), 0.0 );
}
// 2¼üÌ½s»è
int is_parallel(P a1, P a2, P b1, P b2) {
  return EQ( cross(a1-a2, b1-b2), 0.0 );
}
// _a,bðÊé¼üÆ_cÌÔÌ£
double distance_l_p(P a, P b, P c) {
  return abs(cross(b-a, c-a)) / abs(b-a);
}
// _a,bð[_Æ·éüªÆ_cÆÌ£
double distance_ls_p(P a, P b, P c) {
  if ( dot(b-a, c-a) < EPS ) return abs(c-a);
  if ( dot(a-b, c-b) < EPS ) return abs(c-b);
  return abs(cross(b-a, c-a)) / abs(b-a);
}
// a1,a2ð[_Æ·éüªÆb1,b2ð[_Æ·éüªÌð·»è
int is_intersected_ls(P a1, P a2, P b1, P b2) {
    // üªª½sÈêÍdÈÁÄ¢È¢±ÆÉ·é
    if(abs(cross(a2-a1,b2-b1)) < EPS){
        return 0;
    }
    return ( cross(a2-a1, b1-a1) * cross(a2-a1, b2-a1) < EPS ) &&
        ( cross(b2-b1, a1-b1) * cross(b2-b1, a2-b1) < EPS );
}
// a1,a2ð[_Æ·éüªÆb1,b2ð[_Æ·éüªÌð_vZ
P intersection_ls(P a1, P a2, P b1, P b2) {
  P b = b2-b1;
  double d1 = abs(cross(b, a1-b1));
  double d2 = abs(cross(b, a2-b1));
  double t = d1 / (d1 + d2);

  return a1 + (a2-a1) * t;
}
// a1,a2ðÊé¼üÆb1,b2ðÊé¼üÌð·»è
int is_intersected_l(P a1, P a2, P b1, P b2) {
  return !EQ( cross(a1-a2, b1-b2), 0.0 );
}
// a1,a2ðÊé¼üÆb1,b2ðÊé¼üÌð_vZ
P intersection_l(P a1, P a2, P b1, P b2) {
  P a = a2 - a1; P b = b2 - b1;
  return a1 + a * cross(b, b1-a1) / cross(b, a);
}
// Op`ÌàÉ_ª é©Ç¤©
// OÏÌ³ª·×Ä¯¶ÈçàÉ_ è
bool isInTriangle(P p1,P p2,P p3,P s){
	P a=p1-s;
	P b=p2-s;
	P c=p3-s;
	return ((cross(a,b)>0&&cross(b,c)>0&&cross(c,a)>0)||(cross(a,b)<0&&cross(b,c)<0&&cross(c,a)<0));
}

// @üxNgðßé
P unitVector(P a){
	return P(-a.imag(),a.real());
}
// PÊ@üxNgðßé
P unitNormalVector(P a,P b){
	P tmp=(b-a);
	P e=P(-tmp.imag(),tmp.real());
	e/=abs(e);
	return e;
}

P ap,bp,cp;
P acp,bcp,ccp;
double ar,br,cr;

P selDot(P &ab1_a,P &ab1_b,P &ab2_a,P &ab2_b,P &ac1_a,P &ac1_b,P& ac2_a,P &ac2_b){
	P inDot=P(-1,-1);
	// »ê¼êÌð_ðßAOp`ÌÉÜÜêéàÌðIÔ
	if(isInTriangle(ap,bp,cp,intersection_l(ab1_a,ab1_b,ac1_a,ac1_b)))
		inDot=intersection_l(ab1_a,ab1_b,ac1_a,ac1_b);
	else if(isInTriangle(ap,bp,cp,intersection_l(ab1_a,ab1_b,ac2_a,ac2_b)))
		inDot=intersection_l(ab1_a,ab1_b,ac2_a,ac2_b);
	else if(isInTriangle(ap,bp,cp,intersection_l(ab2_a,ab2_b,ac2_a,ac2_b)))
		inDot=intersection_l(ab2_a,ab2_b,ac2_a,ac2_b);
	else if(isInTriangle(ap,bp,cp,intersection_l(ab2_a,ab2_b,ac1_a,ac1_b)))
		inDot=intersection_l(ab2_a,ab2_b,ac1_a,ac1_b);
	return inDot;
}

// ~bÆ~cÌÖWð`FbN
bool checkB(double r){
	P ba1_a,ba1_b,ba2_a,ba2_b;
	P bc1_a,bc1_b,bc2_a,bc2_b;

	P e1=unitNormalVector(bp,ap);
	P e2=unitNormalVector(bp,cp);

	ba1_a=e1*r+bp;
	ba1_b=e1*r+ap;
	ba2_a=-e1*r+bp;
	ba2_b=-e1*r+ap;
	bc1_a=e2*r+bp;
	bc1_b=e2*r+cp;
	bc2_a=-e2*r+bp;
	bc2_b=-e2*r+cp;
	P inDot=selDot(ba1_a,ba1_b,ba2_a,ba2_b,bc1_a,bc1_b,bc2_a,bc2_b);
	// ðð½·ð_ª¶ÝµÈ¢
	if(EQ(inDot.real(),-1))return false;
	bcp=inDot;
	br=r;
	// ~aªOp`ÌOÉÍÝoÄ¢½çA»Ì_Åfalse
	double d1=distance_l_p(ap,bp,bcp);
	double d2=distance_l_p(bp,cp,bcp);
	double d3=distance_l_p(cp,ap,bcp);
	if((!EQ(d1,br)&&d1<br)||(!EQ(d2,br)&&d2<br)||(!EQ(d3,br)&&d3<br))return false;
	//~aÆdÈé©`FbN
	// dÈéÈçfalse
	if(abs(acp-bcp)<br+ar)return false;
	return true;
}
bool checkC(double r){
	P ca1_a,ca1_b,ca2_a,ca2_b;
	P cb1_a,cb1_b,cb2_a,cb2_b;

	P e1=unitNormalVector(cp,ap);
	P e2=unitNormalVector(cp,bp);

	ca1_a=e1*r+cp;
	ca1_b=e1*r+ap;
	ca2_a=-e1*r+cp;
	ca2_b=-e1*r+ap;
	cb1_a=e2*r+cp;
	cb1_b=e2*r+bp;
	cb2_a=-e2*r+cp;
	cb2_b=-e2*r+bp;
	P inDot=selDot(ca1_a,ca1_b,ca2_a,ca2_b,cb1_a,cb1_b,cb2_a,cb2_b);
	// ðð½·ð_ª¶ÝµÈ¢
	if(EQ(inDot.real(),-1))return false;
	ccp=inDot;
	cr=r;
	double d1=distance_l_p(ap,bp,ccp);
	double d2=distance_l_p(bp,cp,ccp);
	double d3=distance_l_p(cp,ap,ccp);
	if((!EQ(d1,cr)&&d1<cr)||(!EQ(d2,cr)&&d2<cr)||(!EQ(d3,cr)&&d3<cr))return false;
	//~aÆdÈé©`FbN
	// dÈéÈçfalse
	if(abs(ccp-acp)<cr+ar)return false;
	return true;
}

// _AÉß¢~ð¼arÅu¯é©`FbN
bool check(double r){
	P ab1_a,ab1_b;
	P ab2_a,ab2_b;

	P ac1_a,ac1_b;
	P ac2_b,ac2_a;

	P e1=unitNormalVector(ap,bp);
	P e2=unitNormalVector(ap,cp);

	ab1_a=e1*r+ap;
	ab1_b=e1*r+bp;
	ab2_a=-e1*r+ap;
	ab2_b=-e1*r+bp;
	ac1_a=e2*r+ap;
	ac1_b=e2*r+cp;
	ac2_a=-e2*r+ap;
	ac2_b=-e2*r+cp;

	P inDot=selDot(ab1_a,ab1_b,ab2_a,ab2_b,ac1_a,ac1_b,ac2_a,ac2_b);
	// ðð½·ð_ª¶ÝµÈ¢
	if(EQ(inDot.real(),-1))
		return false;
	acp=inDot;
	ar=r;
	// ~aªOp`ÌOÉÍÝoÄ¢½çA»Ì_Åfalse
	double d1=distance_l_p(ap,bp,acp);
	double d2=distance_l_p(ap,cp,acp);
	double d3=distance_l_p(bp,cp,acp);
	if((!EQ(d1,ar)&&d1<ar)||(!EQ(d2,ar)&&d2<ar)||(!EQ(d3,ar)&&d3<ar))return false;
	// _BÉß¢~Ì¼aÆS_ðßé
	double ub=1000;
	double lb=0;
	int loop=50;
	while(loop--){
		double mid=(ub+lb)/2;
		if(checkB(mid))lb=mid;
		else ub=mid;
	}
	br=ub;
	ub=1000;
	lb=0;
	loop=50;
	while(loop--){
		double mid=(ub+lb)/2;
		if(checkC(mid))lb=mid;
		else ub=mid;
	}
	cr=ub;
	// àµbÆcÌ~ª­ÁÂ©È¢ÈçAfalse
	if(abs(bcp-ccp)>cr+br)return false;
	return true;
}

int main(){

	int x1,x2,x3,y1,y2,y3;
	while(cin>>x1>>y1>>x2>>y2>>x3>>y3&&!(x1==0&&y1==0&&x2==0&&y2==0&&x3==0&&y3==0)){
		ap=P(x1,y1);
		bp=P(x2,y2);
		cp=P(x3,y3);
		double ub=1000;
		double lb=0;
		int loop=50;
		P acp;
		while(loop--){
			double mid=(ub+lb)/2;
			if(check(mid))lb=mid;
			else ub=mid;
		}
		printf("%.10f %.10f %.10f\n",ar,br,cr);
	}
	return 0;
}