require "matrix"

while input = gets
    input = input.chomp.split.map(&:to_i)
    a = Matrix[[input[0], input[1]], [input[3], input[4]]]
    b = Vector[input[2], input[5]]
    puts (a.inv * b).map{|i| "%#.03f" % i.to_f.round(3)}.to_a.join(" ")
end

