while line = gets
	a,b,c,d,e,f = line.split(" ").map(&:to_f)
	#a,b,c,d,e,f = [1,0,30,0,1,10].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 == 0.0
	y = 0 if y == 0.0
	puts sprintf("%.3f",x) + " " + sprintf("%.3f",y)
end