while line = gets
	#a,b,c,d,e,f = [2,-1,-3,-9,9,27].map(&:to_f)
	a,b,c,d,e,f = line.split(" ").map(&:to_f)
	y = a==0?c/b : (f-(d*c/a))/(e-(b*d/a))
	x = d==0?(c-(b*y))/a : (f-e*y)/d
	x = 0 if x.abs == 0.0
	y = 0 if y.abs == 0.0
	puts sprintf("%.3f %.3f",x,y)
end