#include<iostream>
#include<cstdio>
using namespace std;
int main()
{
	while (true)
	{
		double a1, b1, c1, a2, b2, c2;
		cin >> a1>> b1 >> c1 >> a2 >> b2 >> c2;
		if (cin.fail())
			break;
		double D = a1 * b2 - a2 * b1;
		double D1 = c1 * b2 - c2 * b1;
		double D2 = a1 * c2 - a2 * c1;
		double x = D1 / D;
		double y = D2 / D;
		if (x == 0) x = 0;
		if (y == 0) y = 0;
		printf("%.3f %.3f\n", x, y);
	}
}
