#include<cstdio>

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

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