STDIN.read.chomp.split("\n").each do |list|
  a, b, c, d, e, f = list.split.map(&:to_f)
  x = (b * f - c * e) / (b * d - a * e)
  y = (a * f - c * d) / (a * e - d * b)
  puts [x, y].map { |i| format('%.3f', i) }.join(' ')
end