#include<iostream>
#include<iomanip>
using namespace std;
int main()
{
	int man(int x, int y);
	double b, c, e, f, x, y, z, k, l;
	
	double a, d;
	while (cin >> a >> b >> c >> d >> e >> f&&a != 0 && b != 0 && c != 0 && d != 0 && e != 0 && f != 0)
	{
		double s = b, v = c;
		b *= d;
		c *= d;
		e *= a;
		f *= a;
		b = b - e;
		c = c - f;
		k = c / b;
		l = (v - s*k) / a;
		cout << setiosflags(ios::fixed) << setprecision(4);
		cout << l << ' ' << k << endl;
	}
	return 0;
	
}