while line=gets
	(a,b,c,d,e,f)=line.split(" ").map(&:to_i)
	#ax+by=c y=(c-ax)/b
	#dx+ey=f -> (b/e)x+by=(b/e)f
	#(a-(b/e))x=c-(b/e)f
	x=(c-(b/e)*f)/(a-(b/e))
	y=(c-a*x)/b
	printf("%.3f %.3f\n",x,y)
end