while line = gets
  num = line.split("\s").map(&:to_f)
  x = (num[2]*num[4]-num[1]*num[5])/(num[0]*num[4]-num[1]*num[3]).round(3)
  y = (num[2]*num[3]-num[0]*num[5])/(num[1]*num[3]-num[0]*num[4]).round(3)
  puts "%.3f %.3f" % [x,y]
end