#include <stdio.h>

using namespace std;


int main(){
	long long int a,b,c,d,e,f,pre_x,pre_y;
	double x,y;

	while(scanf("%lld %lld %lld %lld %lld %lld",&a,&b,&c,&d,&e,&f)!=EOF){
		if(c*e==b*f){
			x=0;
		}else{
			pre_x=(10000*(c*e-b*f))/(a*e-d*b);
			if((pre_x%10) >= 5){
				pre_x += (10-(pre_x%10));
			}
			x = pre_x/10000;
		}

		if(a*f==c*d){
			y=0;
		}else{
			pre_y=(10000*(a*f-c*d))/(a*e-b*d);
			if((pre_y%10) >= 5){
				pre_y += 10 - (pre_y%10);
			}
			y = pre_y/10000;
		}

		printf("%.3lf %.3lf\n",x,y);
	}

    return 0;
}