//http://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=0004
#include <iostream>
using namespace std;
int main() {
	cin.tie(0); ios::sync_with_stdio(false);
	double a, b, c, d, e, f;
	while (cin >> a >> b >> c >> d >> e >> f) {
		a *= e / b; c *= e / b;
		double x = (c - f) / (a - d);
		cout << x << " ";
		double y = (f - d*x) / e;
		cout << y << endl;
	}

}