{-------------------------------
 Po zadannim koefficientam i
 pravim chastam uravneniy
 sistemi ... nayti ee rewenie,
 opredelitel <> 0.
 -------------------------------
  # Max Tkachenko # Group 112 #
 -------------------------------
}

Program task_3_28___G(input,output);

 var 
  a1, b1, c1, a2, b2, c2 : real;
  x, y : real;

 begin

  readln(a1, b1, c1, a2, b2, c2);

   y := (a2*c1 - a1*c2) / (a2*b1 + a1*b2);
   x := (c1 - b1*y) / a1;

  writeln( '(', x, ',', y, ' )' );

 end.