a,b,c,d,e,f = gets.split.map(&:to_f) y = (c*d-f*a)/(b*d-e*a) x = (c-b*y)/a puts "#{x} #{y}"