#include<cstdio>
#include<iostream>
using namespace std;

int main() {
	double a, b, c, d, e, f, x, y;
	while (cin >> a >> b >> c >> d >> e >> f) {
		double w = 1.0 / (a*e - b*d);
		double x = w*(e*c - b*f);
		double y = w*(-d*c + a*f);
		if (x == 0) x = 0;
		if (y == 0) y = 0;
		printf("%.3f %.3f\n", x, y);
	}
	return 0;
}