#include <iostream>

using namespace std;

void solve()
{
	double a, b, c, d, e, f;
	while(cin >> a >> b >> c >> d >> e >> f)
	{
		double x, y;
		if(a != 0)
		{
			y = a / (a * e - b * d) * (f - c * d / a);
			x = (c - b * y) / a;
		}
		else
		{
			y = d / (b * d - a * e) * (c - a * f / d);
			x = (f - e * y) / d;
		}
		printf("%.3f %.3f\n", x, y);
	}
}

int main()
{
	solve();
	return(0);
}