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

bool sisya(double x)
{
	if(x < 0)
		x = -x;
			x = x*1000;
	x = x - static_cast<double>(static_cast<int>(x));
	x = x+0.5;
	if(x >= 1.0){
		return true;
	}
	return false;
}

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