let rec read u =
  try let (a, b, e, c, d, f) =
        Scanf.scanf "%d %d %d %d %d %d\n" (fun i1 i2 i3 i4 i5 i6 -> (i1, i2, i3, i4, i5, i6)) in
      let adbc = a * d - b * c and
          s = e * d - b * f and
          t = a * f - e * c in
      let x = (float s)/.(float adbc) and
          y = (float t)/.(float adbc) and
          f z = if z = -0.0 then 0.0 else z in
      Printf.printf "%.3f %.3f\n" (f x) (f y);
      read u
  with
    End_of_file -> ()
    in read ();;