begin
  a, b, e, c, d, f = readline.split.map(&:to_f)
  det = a * d - b * c
  det1 = e * d - b * f
  det2 = a * f - e * c

  sol = [det1/det, det2/det].map{|i| i.to_f.round(3)}
  puts "%.3f %.3f" % sol
end