//A§ûö®
//ax + by = c
//dx + ey = f
//ÌððoÍ¹æ@È¨AðÍêÓÉèÜéàÌÆ·é

//üÍÍÀa`fªóÅæØçêÄ^¦çêéiIíèÍHj
//oÍÍxAyðóÅæØÁÄA¬_æ4ðlÌÜüµ½lðoÍ¹æ



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


void Round(double &refX)
{
	//ë·@¡ñÍ¬_Èºæ4ÅlÌÜüÆ
	const double eps = 0.001;
	if( abs(refX) < eps)
		refX = 0;
}

int main(void)
{
	double a, b, c, d, e, f;
	double x, y;
	while(cin >> a >> b >> c >> d >> e >> f)
	{

		
		//ax+by=c
		//dx+ey=f

		//d(ax+by=c)
		//a(dx+ey=f)
		//ãÓ[ºÓÅ
		//(bd-ae)y=dc-af
		//æÁÄy = (cd-af) / (bd-ae)

		//¯¶­
		//e(ax+by=c)
		//b(dx+ef=f)
		//ãÓ[ºÓÅ
		//(ae-bd)x=ce-bf
		//æÁÄx = (ce-bf) / (ae-bd)

		if(a*e == b*d)
		{
			cout << "ðªêÓÉèÜèÜ¹ñ" << endl;
			continue;
		}

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

		//-0Æ©oé±Æª Á½©çÛßé
		Round(x);
		Round(y);

		//¬_Èºà\¦·éæ¤ÉµA¬_æ4ðlÌÜü·é
		cout << setprecision(3);
		cout << setiosflags(ios::fixed);

		cout << x << ' ';
		cout << y << endl;
	}
	return 0;
}