require 'Matrix'
while data = gets
  a, b, c, d, e, f = data.chomp.split(" ").map(&:to_f)
  result = (Matrix[[a, b],[d, e]].inv * Vector[c, f]).to_a
  puts sprintf("%.3f %.3f", result[0], result[1])
end