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

int main()
{
	int a, b, c, d, e, f;
	while (cin >> a >> b >> c >> d >> e >> f) {
		int tmpa = a, tmpb = b, tmpc = c;
		a *= e, b *= e, c *= e, d *= tmpb, e *= tmpb, f *= tmpb;
		double x = (c - f) / (a - d);
		double y = (tmpc - tmpa*x) / tmpb;

		cout << fixed << setprecision(3) << x << " " << fixed << setprecision(3) << y << endl;
	}
	return 0;
}