#include <algorithm>
#include <cstdio>
using namespace std;
static const double EPS = 1e-9;
int main(){
	double a,b,c,d,e,f;
	while(~scanf("%lf %lf %lf %lf %lf %lf",&a,&b,&c,&d,&e,&f)){
		double x = (b*f-e*c)/(b*d-e*a);
		double y = (c-a*x)/b;
		printf("%.3lf %.3lf\n",x+EPS,y+EPS);
	}
}