#include<iostream>
#include<iomanip>
#define x_Formula(a,b,c,d,e,f) (c-(b*f)/e)/(a-(b*d)/e);
#define y_Formula(x,a,b,c) (c-(a*x))/b;

using namespace std;

double num[6];

void serch(double s_x,double s_y)
{
	int xx,yy;
	xx=s_x*10000.0;
	yy=s_y*10000.0;
	if((xx*10000)%10>4)
		s_x+0.001;
	if((yy*10000)%10>4)
		s_y+0.001;
}
int main()
{
	int i;
	
	for(;cin >> num[0];)
	{
		for(i=1;i<6;i++)
			cin >> num[i];
		
		double x=x_Formula(num[0],num[1],num[2],num[3],num[4],num[5])
		double y=y_Formula(x,num[0],num[1],num[2])
		
		cout << setprecision(3);
		cout << setiosflags(ios::scientific);
		cout << fixed ;
		serch(x,y);
		cout << x << " " << y << endl;
	}
}