#include <stdio.h>

int main(){
	int i,j;
	int a,b,c,d,e,f;
	int tmp;
	float x,y;
		
	while(scanf("%d %d %d %d %d %d\n",&a,&b,&c,&d,&e,&f)!=EOF){
		tmp = d;
		d*=a; e*=a; f*=a;
		a*=tmp; b*=tmp; c*=tmp;
		y=(float)((c-f)/(b-e));
		x=(float)((c-b*y)/a);
		if(x==-0.000000){
			x = 0.000000;
		}
		if(y==-0.000000){
			y = 0.000000;
		}
		printf("%0.3f %0.3f\n",x,y);
	}
	
	
	return 0;
}