#include <bits/stdc++.h>

using namespace std;

const double EPS = 1e-6;

int main() {
	double a, b, c, d, e, f;
	while(cin >> a >> b >> c >> d >> e >> f) {
		double det = a * e - d * b;
		double x = (c * e - b * f) / det, y = (a * f - d * c) / det;
		x = round(x * 1000) / 1000;
		y = round(y * 1000) / 1000;
		if(signbit(x) && abs(x - 0) < EPS) x *= -1;
		if(signbit(y) && abs(y - 0) < EPS) y *= -1;
		cout << fixed << setprecision(3) << x << " " << y << endl;
	}
	return 0;
}

