while abcdef = STDIN.gets
  abcdef.chomp!
  a,b,c,d,e,f = abcdef.split(" ").map { |item| item.to_i }
  x = (c*e-b*f)/(a*e-d*b).to_f.round(3)
  y = (c*d-a*f)/(b*d-a*e).to_f.round(3)
  if x.zero? then x = 0 end
  if y.zero? then y = 0 end
  puts sprintf("%.3f %.3f", x, y)
end