#include <iostream>
#include <iomanip>
#include <cmath>
using namespace std;

// http://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=0004

int gcm(int a, int b) {
	if (a < 0) a *= -1;
	if (b < 0) b *= -1;
	if (a < b) {
		int t = a;
		a = b; 
		b = t;
	}
	if (b == 0) return a;
	return gcm(b, a % b);
}

int lcm(int a, int b) {
	int g = gcm(a, b);
	return (a / g) * (b / g);
}

int main() {
	int a, b, c, d, e, f;
	while (cin >> a >> b >> c >> d >> e >> f) {
		int first = lcm(a, d);
		if (abs(a) < abs(d)) {
			a *= first;
			b *= first;
			c *= first;
		} else {
			d *= first;
			e *= first;
			f *= first;
		}
		if (a * d > 0) {
			a -= d;
			b -= e;
			c -= f;
		} else {
			a += d;
			b += e;
			c += f;
		}
		
		float y = c / b;
		float x = (f - e * y) / d;
		cout << fixed << setprecision(3) << (x == 0.0 ? abs(x) : x) << " " << fixed << setprecision(3) << (y == 0.0 ? abs(y) : y) << endl;
	}
	return 0;
}