#include <stdio.h>

int main(void)
{
	float a, b, c, d, e, f;
	float x, y;
	while(scanf("%f %f %f %f %f %f", &a, &b, &c ,&d, &e, &f) ==6)
	{
		x = (c*e - b*f) / (a*e - b*d);
		y = (f - d*x) / e;
		x *= 10000;
		y *= 10000;
		if(x >= 0)
		{
			x += 5;
		}
		else
		{
			x -= 5;
		}
		if(y >= 0)
		{
			y += 5;
		}
		else
		{
			y -= 5;
		}
		x /= 10000;
		y /= 10000;
		printf("%f %f\n", x, y);
		printf("%.3f %.3f\n\n", x, y);
	}
	return 0;
}
