
require 'matrix'

def solve(line)
  a = Matrix[ [line[0].to_f, line[1].to_f], [line[3].to_f, line[4].to_f] ]
  p a
  b = Vector[line[2].to_f, line[5].to_f]
  p b
  s = a.inv * b

  return s.to_a

end

inputs = []
while (line = gets) != nil
  inputs.push(line.split())
end

for i in inputs
  s = solve(i)
  puts printf("%#0.3f %#0.3f", s[0], s[1])
end