#include<iostream>
using namespace std;
int main()
{
	double a, b, c, d, e, f;
	while (cin >> a >> b >> c >> d >> e >> f)
	{
		cout<<(e*c-b*f)/(a*e-b*d)<<" "<<(a*f - c*d) / (a*e - b*d) << endl;
	}
	return 0;
}
