int main(void){
double a,b,c,d,e,f,i,j,x,y;
while (scanf("%f %f %f %f %f %f",&a,&b,&c,&d,&e,&f) != EOF) {
i=(c*e-f*b)/(a*e-d*b);
j=(c*d-f*a)/(b*d-e*a);
x=i+0.0005;
y=j+0.0005;
printf("%.3f %.3f\n",x,y);
return 0;
}