#include<bits/stdc++.h>
using namespace std;
int main(){
	double a,b,c,d,e,f,x = 0, y = 0;
	while (~scanf("%lf%lf%lf%lf%lf%lf", &a, &b, &c, &d, &e, &f)){
		x = 0; y = 0;
		x = double(b*f - c*e)/double(b*d-a*e);
		y = double(c - a*x)/double(b);
		if (x == 0) x = 0;
		if (y == 0) y = 0;
		printf("%.3lf %.3lf\n", x , y);
	}
	return 0;
}
