a,b,c,d,e,f=gets.split.map(&:to_i) y = Rational(c*d-a*f,-e*a+b*d) x = Rational(f,d)-Rational(e*y,d) puts [x.to_f, y.to_f] * " "