#include<iostream>
using namespace std;
int main() {
	int a, b, c, d, e, f;
	double g, h, i, j, x, y;
	while (cin >> a >> b >> c >> d >> e >> f) {
		g = b*d - a*e;
		h = c*d - a*f;
		y = h / g;
		i = a*e - b*d;
		j = c*e - b*f;
		x = j / i;
		cout << x << " " << y << endl;
	}
}