require 'matrix'

until $stdin.eof?
  a, b, c, d, e, f = gets.split.map(&:to_i)
  mat  = Matrix[ [a, b], [d, e] ]
  pair = Matrix[ [c],    [f] ]
  result = mat.inv * pair

  x, y = result[0, 0].to_f, result[1, 0].to_f
  puts "%.3f %.3f" % [x, y]
end