#include<iostream>
#include<string>
#include<cmath>
#include<queue>
#include<vector>
#include<functional>
#include<algorithm>
#include<cstdio>
using namespace std;
int main() {
	int a, b, c, d, e, f;
	while (cin >> a >> b >> c >> d >> e >> f) {
		int a2 = a, b2 = b, c2 = c;
		int g = a, h = d;
		if (g > h) swap(g, h);
		while (g != 0) {
			int k = g;
			g = h%g;
			h = k;
		}
		h = (h*(a / h)*(d / h));
		b = b*(h / a);
		c = c*(h / a);
		e = e*(h / d);
		f = f*(h / d);
		long double ansx = ((long double)(f - c) / (e - b)), ansy;
		ansy = (c2 - ansx*b2) / a2;
		printf("%LF %LF", ansy, ansx);
		cout << endl;
	}
}