#include<cstdio>

double a,b,c,d,e,f;
double x,y;

int main()
{
	while(scanf("%lf %lf %lf %lf %lf %lf",&a,&b,&c,&d,&e,&f)!=EOF)
	{
		if(b!=0) y=(d*c-a*f)/(d*b-a*e);
		else y=(a*f-d*c)/(a*e-d*b);
		if(a!=0) x=(c-b*y)/a;
		else x=(f-e*y)/d;
		printf("%.3lf %.3lf\n",x,y);
	}
	return 0;
}