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

int main()
{
	double a,b,c,d,e,f;
	double x,y;
	while(cin >> a >> b >> c >> d >> e >> f)
	{
		double l = a*e-d*b;
		x=(c*e-b*f)/l+0;
		y=(a*f-c*d)/l+0;
		cout << fixed << setprecision(3)<< x << " " << y << endl;
	}
	return 0;
}