#include <bits/stdc++.h>
using namespace std;

int main(){
	double a,b,c,d,e,f;
	while(scanf("%lf %lf %lf %lf %lf %lf",&a,&b,&c,&d,&e,&f)!=EOF){
		double x,y;
		x = double(e*c-b*f)/(a*e-b*d);
		y = double(a*f-c*d)/(a*e-b*d);
		if(x<=0.00 && x>=-0.00400)x=0.0001;
		if(y<=0.00 && y>-0.00500)y=0.0001;
		printf("%.3lf %.3lf\n",x,y);
	}
}
