#include <stdio.h>

int main()
{
	double a,b,c,d,e,f;
	while(scanf("%lf %lf %lf %lf %lf %lf",&a,&b,&c,&d,&e,&f) != EOF)
	{
		double det = a*e-b*d;
		printf("%0.3f %0.3f\n",(c*e-f*b)/det,(a*f-d*c)/det);
	}
	return 0;
}