# codeing : utf-8
require 'matrix'

while input = gets do
  input = input.split(" ").map(&:to_f)
  Matrix[
      [input[0], input[1]],
      [input[3],input[4]]]
            .lup.solve([input[2],input[5]]).map{|b| b.to_f.round(3)}
    .tap{|c| print format("%.3f %.3f\n", c[0], c[1])}
end

