#include<iostream>
#include<iomanip>

using namespace std;

double x;
double y;

void serch()
{
	int xx,yy;
	xx=x*1000;
	yy=y*1000;
//	cout << xx << " " << yy << endl;
	if(xx>0)
		xx+=5;
	else
		xx-=5;
	if(yy>0)
		yy+=5;
	else
		yy-=5;
	x=xx/1000;
	y=yy/1000;
//	cout << xx << " " << yy << endl;

}
int main()
{
	double a1,a2,b1,b2,c1,c2;
	int i;
	
	for(;cin >> a1;)
	{
			cin >> b1 >> c1 >> a2 >> b2 >> c2 ;
		
		x=((c1*b2)-(b1*c2))/((a1*b2)-(a2*b1));
		y=((a1*c2)-(a2*c1))/((a1*b2)-(a2*b1));
		
		cout << setprecision(3);
		cout << setiosflags(ios::scientific);
		cout << fixed ;
		serch();
		cout << x << " " << y << endl;
	}
}