#include<stdio.h>
int main(void){
	double a,b,c,d,e,f;
	double x,y;
	while(scanf("%lf %lf %lf %lf %lf %lf",&a,&b,&c,&d,&e,&f)!=EOF){
		y=(a*f-d*c)/(a*e-d*b);
		x=(b*f-e*c)/(b*d-a*e);
	/*	if(y%0.01>0.004){
			y+=0.001;
		}
		if( x/0.01>0.004){
			x+=0.001;
		}*/
		printf("%.3f %.3f\n",x,y);
	}
	return 0;
}
