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

int det(int a00, int a01, int a10, int a11)
{
	return a00*a11 - a01*a10;
}

int main()
{
	int a, b, c, d, e, f;
	while (cin >> a >> b >> c >> d >> e >> f)
	{
		int t = det(a, b, d, e);
		cout << fixed << setprecision(3) << (double)det(c, b, f, e) / t << ' ' << (double)det(a, c, d, f) / t << endl;
	}
	return 0;
}