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

int main()
{
	double a, b, c, d, e, f, x, y;			// ax + by = c 
											// dx + ey = f
	while (cin >> a >> b >> c >> d >> e >> f)
	{
		x = (double)((c*e - b*f) / (a*e - b*d));
		y = (double)(( - (c*d) + a*f) / (a*e - b*d));

		(x == 0) ? x = 0 : x;
		(y == 0) ? y = 0 : y;
		printf("%.3f %.3f\n", x, y);
	}
}