require 'matrix'

while line = gets
  data = line.split.map(&:to_f)
  A = Matrix.rows([
    [data[0],data[1]],
    [data[3],data[4]]])
  y = Matrix.column_vector([data[2],data[5]])
  x = A.inv*y
  result = []
  x.each do |i|
    result << sprintf("%#.3f",i)
  end
  puts result.join(" ")
end