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

int main()
{
	double a, b, c, d, e, f, x, y;

	while (cin >> a >> b >> c >> d >> e >> f) {
		if (e * c == b * f)
			x = 0;
		else
			x = (e * c - b * f) / (a * e - b * d);

		if (d * c == a * f)
			y = 0;
		else
			y = (- d * c + a * f) / (a * e - b * d);

		cout << setiosflags(ios::fixed | ios::showpoint) << setprecision(3)
			<< x << " " << y << endl;
	}

	return 0;
}
