import std.stdio;

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