#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 (cin.eof()) break;
		y = (c*d - a*f) / (b*d - a*e);
		x = -b/a * y + c/a;
		cout << setprecision(3) << setiosflags(ios::fixed) << x << " " << y << endl;
	}
	return 0;
}