# codeing : utf-8
require 'matrix'

while input = gets do
  input = input.split(" ").map(&:to_f)
  ans = Matrix[
      [input[0], input[1]],
      [input[3],input[4]]]
            .lup.solve([input[2],input[5]]).to_a
  puts format("%.3f %.3f ",ans[0].round(3),ans[1].round(3))
end
  
N
