x=require('fs').readFileSync('/dev/stdin','utf8').trim().split(/\s/);
for(i=0;i<x.length;){
a=x[i++];
b=x[i++];
c=x[i++];
d=x[i++];
e=x[i++];
f=x[i++];
y=(c*d-a*f)/(b*d-a*e);
x=(c-b*y)/a;
console.log((Math.round(x*=1000)/1000).toFixed(3)+" "+(Math.round(y*=1000)/1000).toFixed(3));
}