process.stdin.on("data",function(c){
	(c+"").trim().split("\n").some(function(n,x){
		n=n.split(" ");
		var a=+n[0],b=+n[1],c=+n[2],d=+n[3],e=+n[4],f=+n[5],x;
		console.log((x=((c*e-b*f)/(a*e-b*d))).toFixed(3),((c-a*x)/b).toFixed(3));
	});
}).resume();