#include <bits/stdc++.h>
using namespace std;

int main() {
	double a, b, c, d, e, f;
	while (cin >> a >> b >> c >> d >> e >> f) {
		double n, m;
		n = b * d - a * e;
		m = c * d - f * a;
		double y = m / n;

		double l = c - b * y;
		double x = l / a;

		cout << fixed << setprecision(3) << x << ' ' << y << endl;
	}
}
