program Untitled;
var
   a1, a2, b1, b2, c1, c2 : integer;
   g, oa, ob, oc, ka1, kb1, kc1, ka2, kb2, kc2, ka3, kb3, kc3 : real;
begin
     readln ( a1, b1, c1 );
     readln ( a2, b2, c2 );
     g := a1 / a2;
     ob := b1 - (b2 * g);
     oc := c1 - (c2 * g);
     if ( a1 = b1 ) and ( a2 = b2 ) then ob := 0;
     if ( a1 = c1 ) and ( a2 = c2 ) then oc := 0;
     ka1 := 0;
     kb1 := ob;
     kc1 := oc;
     g := b1 / b2;
     oa := a1 - (a2 * g);
     oc := c1 - (c2 * g);
     if ( b1 = a1 ) and ( b2 = a2 ) then oa := 0;
     if ( b1 = c1 ) and ( b2 = c2 ) then oc := 0;
     ka2 := oa;
     kb2 := 0;
     kc2 := oc;
     g := c1 / c2;
     oa := a1 - (a2 * g);
     ob := b1 - (b2 * g);
     if ( c1 = a1 ) and ( c2 = a2 ) then oa := 0;
     if ( c1 = b1 ) and ( c2 = b2 ) then ob := 0;
     ka3 := oa;
     kb3 := ob;
     kc3 := 0;
     if ka1 < 0 then ka1 := 10000;
     if kb1 < 0 then kb1 := 10000;
     if kc1 < 0 then kc1 := 10000;
     if ka2 < 0 then ka2 := 10000;
     if kb2 < 0 then kb2 := 10000;
     if kc2 < 0 then kc2 := 10000;
     if ka3 < 0 then ka3 := 10000;
     if kb3 < 0 then kb3 := 10000;
     if kc3 < 0 then kc3 := 10000;
     if ( (ka1 + kb1 + kc1) <= (ka2 + kb2 + kc2) ) and ( (ka1 + kb1 + kc1) <= (ka3 + kb3 + kc3) ) then
        writeln ( ka1 : 0 : 6, ' ', kb1 : 0 : 6, ' ', kc1 : 0 : 6 )
     else
     if ( (ka2 + kb2 + kc2) <= (ka1 + kb1 + kc1) ) and ( (ka2 + kb2 + kc2) <= (ka3 + kb3 + kc3) ) then
        writeln ( ka2 : 0 : 6, ' ', kb2 : 0 : 6, ' ', kc2 : 0 : 6 )
     else
     if ( (ka3 + kb3 + kc3) <= (ka2 + kb2 + kc2) ) and ( (ka3 + kb3 + kc3) <= (ka1 + kb1 + kc1) ) then
        writeln ( ka3 : 0 : 6, ' ', kb3 : 0 : 6, ' ', kc3 : 0 : 6 );
readln;
end.
