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