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