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