function Main(input) {
    lines=input.split("\n");
    for(var i in lines){
	if(lines[i]==" ")break;
	a=lines[i].split(" ").map(function(x){return parseFloat(x);});
	x=(a[4]*a[2]-a[1]*a[5])/(a[0]*a[4]-a[1]*a[3]);
	y=(a[0]*a[5]-a[3]*a[2])/(a[0]*a[4]-a[1]*a[3]);
	console.log("%s %s",x.toFixed(3),y.toFixed(3));
    }
}
Main(require("fs").readFileSync("/dev/stdin", "utf8"));