STDIN.read.chomp.split("\n").each do |list|
  a, b, c, d, e, f = list.split.map(&:to_f)

  x = (e * c - b * f) / (a * e - d * b)
  y = (d * c - a * c) / (d * b - a * e)
  puts [x, y].map { |i| format('%.3f', i) }.join(' ')
end