while gets do
  a, b, c, d, e, f = $_.split(/\s/).map(&:to_f)

  z = b*d - a*e
  x = (b*f - c*e)/z
  y = (c*d - a*f)/z

  x = 0.0 if x == 0
  y = 0.0 if y == 0

  puts sprintf("%.3f\s%.3f", x.round(3), y.round(3))
end