until (ln = gets.chomp) == ''
  a, b, e, c, d, f = ln.split.map(&:to_f)
  det = a * d - b * c
  det1 = e * d - b * f
  det2 = a * f - e * c

  sol = []
  [det1/det, det2/det].each do |i|
    i = 0.0 if i.zero?
    sol << i.round(3)
  end

  puts "%.3f %.3f" % sol
end