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 <cstdlib>
#include <cmath>
#include <climits>
#include <cfloat>
#include <map>
#include <utility>
#include <set>
#include <iostream>
#include <memory>
#include <string>
#include <vector>
#include <algorithm>
#include <functional>
#include <sstream>
#include <complex>
#include <stack>
#include <queue>
#include <numeric>
#include <iomanip>

#define REP(i,n) for(i=0; i < (n); i++)
#define REPONE(i, n) for(i=1; i <= (n); i++)
#define LOOP(n) for(int loopCount=1; loopCount <= (n); loopCount++)
#define ITER(c) __typeof((c).begin())
#define EACH(c,it) for(ITER(c) it =(c).begin(); it!=(c).end(); it++)
#define SZ(c) ((int) (c).size())
#define ALL(c) c.begin(), c.end()
#define SUM(c) accumulate(ALL(c), 0)
#define EXIST(c,v) (find(ALL(c), (v)) != (c).end())
#define PB push_back
#define MP make_pair

using namespace std;
static const double PI = 3.141592653589793238462643383279;
typedef long long ll;

#define P complex<T> 
#define EPS (1e-9)

/*****
 * ¼üÍ¼üãÌÙÈé2_(p1, p2)Å\·
 * ~ÍScÆ¼arÉæè(c, r)Æ\·
 *****/

//XJ[lÌðÔ·B+:1, -:-1, 0:0B
template<typename T>
int sig(T a){
    return a==0?0:a>0?1:-1;
}

//xNgp1, p2ÌàÏðÔ·
template<typename T>
T iprod(P p1, P p2){
    return (p1.real()*p2.real()) + (p1.imag()*p2.imag());
}

//xNgp1, p2ÌOÏ(XJ[l,zÀW)ðÔ·
template<typename T>
T oprod(P p1, P p2){
    return (p1.real()*p2.imag()) - (p1.imag()*p2.real());
}

//üª(p1, p2)Æ_qÌ£ðÔ·
template<typename T>
T disSP(P p1, P p2, P q){
    if(iprod( (p2-p1), (q-p1) ) < EPS) return abs(q-p1);
    if(iprod( (p1-p2), (q-p2) ) < EPS) return abs(q-p2);
    return disLP(p1, p2, q);
}

//¼ü(p1, p2)Æ_qÌ£ðÔ·
template<typename T>
T disLP(P p1, P p2, P q){
    return (T)(abs( oprod( (p2-p1), (q-p1) ) ) / abs(p2-p1));
}

//üª(p1, p2)Æüª(q1, q2)Ìð_ª¶Ý·éÆ«ÉtrueðÔ·
template<typename T>
bool crsSS(P p1, P p2, P q1, P q2){
    if(max(p1.real(), p2.real()) + EPS < min(q1.real(), q2.real())) return false;
    if(max(q1.real(), q2.real()) + EPS < min(p1.real(), p2.real())) return false;
    if(max(p1.imag(), p2.imag()) + EPS < min(q1.imag(), q2.imag())) return false;
    if(max(q1.imag(), q2.imag()) + EPS < min(p1.imag(), p2.imag())) return false;
   return sig(oprod(p2-p1, q1-p1)) * sig(oprod(p2-p1, q2-p1)) < EPS
        && sig(oprod(q2-q1, p1-q1)) * sig(oprod(q2-q1, p2-q1)) < EPS;
}

//~(c1, r)Æ~(c2, r2)Ìð_ª¶Ý·éÆ«ÉtrueðÔ·B
//Ú_ÌÆ«à½ªtrueðÔ·
template<typename T>
bool crsCC(P c1, T r1, P c2, T r2){
    T dis = abs(c1-c2);
    return dis < r1 + r2 + EPS && abs(r1-r2) < dis + EPS;
}

//Op`(p1, p2, p3)ÌOSðÔ·
/*********¢À*********/
template<typename T>
P ccenter(P p1, P p2, P p3){
    return p1;
}
//4_p1, p2, p3, p4ª¯ê¼üãÉ éÆ«trueðÔ·B
//4_ª¯ê¼üãÉ éÆ«àtrueðÔ·çµ¢
template<typename T>
bool onCir(P p1, P p2, P p3, P p4){
    if(abs(oprod(p2-p1, p3-p1)) < EPS) return true;
    P c = ccenter(p1, p2, p3);
    return abs(norm(c-p1) - norm(c-p4)) < EPS;
}

//_q©ç¼ü(p1, p2)Éºëµ½üÌ«ðÔ·
template<typename T>
P proj(P p1, P p2, P q){
    return p1 + (iprod( p2-p1, q-p1 )/(norm(p2-p1))*(p2-p1));
}

//¼ü(p1,p2)Æ¼ü(q1, q2)Ìð_ðÔ·
template<typename T>
P isLL(P p1, P p2, P q1, P q2){
    T d = oprod( q2-q1, p2-p1 );
    if ( abs(d) < EPS ) return NULL;
    return p1 + (oprod(q2-q1, q1-p1)/d*(p2-p1));
}

//¼ü(p1,p2)Æ~(c,r)Ìð_ÌvectorðÔ·(p1Éß¢)
template<typename T>
vector<P> isCL(P c, T r, P p1, P p2){
    vector<P> ans;
    T x = iprod(p1-c, p2-p1);
    T y = norm(p2-p1);
    T d  = x*x - y*(norm(p1-c) - r*r);
    if(d < -EPS) return ans;
    if(d < 0) d = 0;
    P q1 = p1 - (x/y)*(p2-p1);
    P q2 = sqrt(d)/y*(p2-p1);
    ans.push_back(q1-q2);
    ans.push_back(q1+q2);
    return ans;
}

//~(c1, r1), ~(c2, r2)Ìð_ÌvectorðÔ·
template<typename T>
vector<P> isCC(P c1, T r1, P c2, T r2){
    vector<P> ans;
    T x = norm(c1-c2);
    T y = ((r1*r1 - r2*r2)/x + 1)/2;
    T d = r1*r1/x - y*y;
    if(d < -EPS) return ans;
    if(d < 0) d=0;
    P q1 = c1 + y*(c2-c1);
    P q2 = (c2 - c1)*(polar(sqrt(d), (T)M_PI/2));
    ans.push_back(q1-q2);
    ans.push_back(q1+q2);
    return ans;
}

//_p©çø¢½~(c, r)ðÊéÚüÌÚ_ÌvectorðÔ·
template<typename T>
vector<P> tanCP(P c, T r, P p){
    vector<P> ans;
    T x = norm(p-c);
    T d = x - r*r;
    if(d < -EPS) return ans;
    if(d < 0) d = 0;
    P q1 = (r*r/x)*(p-c);
    P q2 = (p-c)*(polar(-r*sqrt(d)/x, (T)M_PI/2));
    ans.push_back(c+q1-q2);
    ans.push_back(c+q1+q2);
    return ans;
}

//~(c1, r1), ~(c2, r2)Ì¤ÊÚüÌvectorðÔ·
/******2~ªÚ·éÆ«ÌªvC³*********/
template<typename T>
vector< vector<P> > tanCC(P c1, T r1, P c2, T r2){
    vector< vector<P> > ans;
    vector<P> line;
    if(abs(r1-r2) < EPS){
        P dir = c2-c1;
        dir = dir * polar(r1/abs(dir), (T)M_PI/2);
        
        line.clear(); line.push_back(c1+dir); line.push_back(c2+dir);
        ans.push_back(line);
        line.clear(); line.push_back(c1-dir); line.push_back(c2-dir);
        ans.push_back(line);
        
    }else{
        P p = (-r2*c1 + r1*c2)/(r1-r2);
        vector<P> ps, qs;
        ps = tanCP(c1, r1, p);
        qs = tanCP(c2, r2, p);
        for(int i=0; i<(int)ps.size() && i<(int)qs.size(); i++){
            line.clear(); line.push_back(ps[i]);line.push_back(qs[i]);
            ans.push_back(line);
        }
    }
    P p = (r2*c1 + r1*c2)/(r1+r2);
    vector<P> ps, qs;
    ps = tanCP(c1, r1, p);
    qs = tanCP(c2, r2, p);
    /*** ps[i] == qs[i] ÌÛÉÚüðÁèÅ«éæ¤Éµ½¢ ***/
    for(int i=0; i<(int)ps.size() && i<(int)qs.size(); i++){
        /*** ÈºÍèÉÇÁ ***/
        if(abs(ps[i]-qs[i]) < EPS){
            P dir = (c2 - c1)*polar((T)1/(abs(c2-c1)), (T)M_PI/2);
            ps[i] += dir;
            qs[i] -= dir;
        }
        /*** ±±ÜÅ ***/
        line.clear(); line.push_back(ps[i]);line.push_back(qs[i]);
        ans.push_back(line);
    }
    return ans;
}

//~(c1, r1), ~(c2, r2)Ì¤ÊªÊÏ
template<typename T>
T areaCC(P c1, T r1, P c2, T r2){
    T d = abs(c1-c2);
    if(r1+r2 < d+EPS) return 0;
    if(d < abs(r1-r2) + EPS){
        T r = min(r1, r2);
        return r*r*M_PI;
    }
    T x = (d*d+r1*r1-r2*r2)/(2*d);
    T t1 = acos(x/r1);
    T t2 = cos((d-x)/r2);
    return r1*r1*t1 + r2*r2*t2 - d*r1*sin(t1);
}

//Oð´_Æ·éB~(O,r1)ÆOp`(O,p1,p2)Ì¤ÊªÊÏ
template<typename T>
T areaCT(T r, P p1, P p2){
    T o(0, 0);
    vector<P> qs = isCL(o, r, p1, p2);
    if(qs.empty()) return r*r*arg(p1-p2)/2;
    bool b1 = abs(p1) > r + EPS, b2 = abs(p2) > r + EPS;
    if(b1 && b2){
        if(iprod(p1-qs[0], p2-qs[0]) < EPS &&
                iprod(p1-qs[1], p2-qs[1]) < EPS){
            return (r*r*(arg(p1-p2)-arg(qs[0]-qs[1])) + oprod(qs[0], qs[1]))/2;
        }else{
            return r*r*arg(p1-p2)/2;
        }
    }else if(b1){
        return (r*r*arg(p1-qs[0]) + oprod(qs[0], p2))/2;
    }else if(b2){
        return (r*r*arg(qs[1]-p2) + oprod(p1, qs[1]))/2;
    }else{
        return oprod(p1, p2) / 2;
    }
}


//ÔvZÊO(n)
//Ê½p`psÉÎµÄA_qªàÌÆ«Í1,
//ÓãÌÆ«ÍOAOÌÍ-1ðÔ·
template<typename T>
int contains(vector<P> ps, P q){
    int n = ps.size();
    int ans = -1;
    for(int i=0; i<n; i++){
        P a = ps[i] - q, b = ps[(i+1)%n] - q;
        if(a.imag() > b.imag()){
            swap(a,b);
        }
        if(a.imag() < EPS && b.imag() > EPS && oprod(a,b) > EPS){
            ans = -ans;
        }
        if(abs(oprod(a,b)) < EPS && iprod(a,b) < EPS) return 0;
    }
    return ans;
}

template<typename T>
bool circleInTriangle(vector<P> ps, P c, T r){
    return contains(ps,c)&&(disLP(ps[0],ps[1],c)>r-EPS)
        &&(disLP(ps[1],ps[2],c)>r-EPS)&&(disLP(ps[2],ps[0],c)>r-EPS);
}


typedef complex<double> point;
#define N 200

int main(){
    point p1, p2, p3, c1, c2, c3, v1, v2, v3;
    double l1, l2, l3, r1, r2, r3, ub1, ub2, ub3;
    double low1, high1, mid1, low2, high2, mid2, low3, high3, mid3;
    double x, y, d1, d2, d3;
    int bs1, bs2, bs3;
    vector<point> ps(3);
    while(1){
        scanf("%lf%lf",&x,&y);
        p1 = point(x,y);
        scanf("%lf%lf",&x,&y);
        p2 = point(x,y);
        scanf("%lf%lf",&x,&y);
        p3 = point(x,y);
        if(p1==p2) break;
        ps[0] = p1;
        ps[1] = p2;
        ps[2] = p3;
        if(!contains(ps,(p1+p2+p3)/3.0))swap(ps[0],ps[1]);
        ub1 = disLP(p2,p3,p1);
        ub2 = disLP(p3,p1,p2);
        ub3 = disLP(p1,p2,p3);
        v1 = ((p3-p1)*abs(p2-p1)+(p2-p1)*abs(p3-p1))/(abs(p2-p1)+abs(p3-p1));
        v2 = ((p1-p2)*abs(p3-p2)+(p3-p2)*abs(p1-p2))/(abs(p1-p2)+abs(p3-p2));
        v3 = ((p2-p3)*abs(p1-p3)+(p1-p3)*abs(p2-p3))/(abs(p2-p3)+abs(p1-p3));
        if(0){
        printf("line(%f,%f,%f,%f);\n",0.1*p1.real()+250.0, 0.1*p1.imag()+250.0, 0.1*p2.real()+250.0, 0.1*p2.imag()+250.0);
        printf("line(%f,%f,%f,%f);\n",0.1*p3.real()+250.0, 0.1*p3.imag()+250.0, 0.1*p2.real()+250.0, 0.1*p2.imag()+250.0);
        printf("line(%f,%f,%f,%f);\n",0.1*p1.real()+250.0, 0.1*p1.imag()+250.0, 0.1*p3.real()+250.0, 0.1*p3.imag()+250.0);
        }
        low1 = 0.0; high1 = 1.0;
        REP(bs1,N){
            if(0){
            printf("circle(%f, %f, %f);\n",c1.real()+250.0, c1.imag()+250.0, r1);
            printf("circle(%f, %f, %f);\n",c2.real()+250.0, c2.imag()+250.0, r2);
            printf("circle(%f, %f, %f);\n",c3.real()+250.0, c3.imag()+250.0, r3);
            }
            if(high1-low1<EPS) break;
            mid1 = (low1 + high1)*0.5;
            c1 = p1 + v1*mid1;
            r1 = disLP(p1,p2,c1);
            if(!circleInTriangle(ps,c1,r1)){
                high1 = mid1;
                continue;
            }
            if(r1<EPS){
                low1 = mid1;
                continue;
            }
            low2 = 0.0; high2 = 1.0;
            REP(bs2,N){
                if(high2-low2<EPS)break;
                mid2 = (low2+high2)*0.5;
                c2 = p2 + v2*mid2;
                r2 = disLP(p2,p3,c2);
                if(!circleInTriangle(ps,c2,r2)){
                    high2 = mid2;
                    continue;
                }
                d2 = abs(c1-c2) - (r1+r2);
                if(d2 > 0){
                    low2 = mid2;
                    continue;
                }
                if(d2 < 0){
                    high2 = mid2;
                    continue;
                }
            }
            /*
            if(abs(d2)>EPS){
                low1 = mid1;
                continue;
            }
            */
            low3 = 0.0; high3 = 1.0;
            REP(bs3,N){
                if(high3-low3<EPS) break;
                mid3 = (low3+high3)*0.5;
                c3 = p3 + v3*mid3;
                r3 = disLP(p3,p1,c3);
                if(!circleInTriangle(ps,c3,r3)){
                    high3 = mid3;
                    continue;
                }
                d3 = abs(c1-c3)-(r1 + r3);
                if(d3 > 0){
                    low3 = mid3;
                    continue;
                }
                if(d3 < 0){
                    high3 = mid3;
                    continue;
                }
            }
            /*
            if(abs(d3)>EPS){
                low1 = mid1;
                continue;
            }
            */
            d1 = abs(c2-c3) - (r2+r3);
            //cout << d1 << endl;
            if(abs(d1)<EPS) break;
            if(d1 > 0){
                high1 = mid1;
                continue;
            }
            if(d1 < 0){
                low1 = mid1;
                continue;
            }
        }
        printf("%.9f %.9f %.9f\n", r1, r2, r3);
    }
    return 0;
}