#include<iostream>
using namespace std;

int main()
{
	int a, b, c, d, e, f;
	double x, y;
	while (cin >> a >> b >> c >> d >> e >> f)
	{
		y = (double)(a*f - c * d) / (double)(a*e - b * d);
		if (a != 0)
		{
			x = (double)(c - b * y) / (double)a;
			cout << x << y;
		}
		else
		{
			x = (double)(f - e * y) / (double)d;
			cout << x << y;
		}

	}
	getchar();
	getchar();
	return 0;
}
