while s = gets
  nums = s.split.map(&:to_f)
  a, b, c, d, e, f = nums
  x = (c * e - b * f) / (a * e - b * d)
  y = (a * f - c * d) / (a * e - b * d)
  x = x.round(3)
  y = y.round(3)
  x = x != 0 ? x : 0
  y = y != 0 ? y : 0
  puts sprintf("%.3f %.3f", x, y)
end