#include <stdio.h>
int main()
{
	float a,b,c,d,e,f,x,y,t1,t2,t3;
	while (scanf("%f %f %f %f %f %f",&a,&b,&c,&d,&e,&f)!=EOF)
	{
		t1=a*e-b*d;
		t2=a*f-c*d;
		t3=c*e-b*f;
		if(t1!=0)
		{
			x=t3/t1;
			y=t2/t1;
			printf("%3.3f %3.3f\n",x,y);
		}
	}
	return 0;
}