def solve2 ns
  a, b, c, d, e, f = ns
  det = a * e - b * d
  x = (c * e / det) - (b * f / det)
  y = (a * f / det) - (c * d / det)
=begin
  x = (c * e - b * f) / det
  y = (a * f - c * d) / det
=end
  [x, y]
end

while ln = gets
  ns = ln.split.map(&:to_f)
  puts "%.3f %.3f" % solve2(ns)
end
