while s = gets
  ss = s.scan(/-?\d+/).map(&:to_f)
  d = ss[0] * ss[4] - ss[1] * ss[3]
  x = (ss[2] * ss[4] - ss[1] * ss[5]) / d
  y = (ss[0] * ss[5] - ss[2] * ss[3]) / d
  puts "%.3f %.3f" % [x, y]
end