// 2011/05/30 Tazoe

#include <iostream>
using namespace std;

int main()
{
	while(true){
		double a, b, c, d, e, f;
		cin >> a;
		if(cin.eof())
			break;
		cin >> b >> c >> d >> e >> f;

		double x = (c*e-f*b)/(a*e-d*b);
		if(x==-0.0)
			x = 0.0;
		double y = (c*d-f*a)/(b*d-e*a);
		if(y==-0.0)
			y = 0.0;

		cout.precision(3);
		cout << fixed << x;
		cout << ' ';
		cout.precision(3);
		cout << fixed << y;
		cout << endl;
	}

	return 0;
}