#include<stdio.h>

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