#include <iostream>

using namespace std;

int main() {
	double a, b, c, d, e, f, x, y, t;
	while(cin >> a >> b >> c >> d >> e >> f) {
		t = 1.0 / (a*e - b*d);
		x = (e*c - b*f) * t;
		y = (a*f - d*c) * t;
		cout << x << setprecision(3) << y << setprecision(3) << endl;
	}
	return 0;
}