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