while (line = gets) do
  a, b, c, d, e, f = line.split().map(&:to_f)

  c /= a
  b /= a
  a /= a

  f -= (c * d)
  e -= (b * d)
  d -= (a * d)

  f /= e
  d /= e
  e /= e

  c -= (f * b)
  a -= (d * b)
  b -= (e * b)

  c = (c*(10**3)).round
  c = (c*(10**-3)).round
  f = (f*(10**3)).round
  f = (f*(10**-3)).round

  printf("%.3f %.3f\n", c, f)
end