#include <stdio.h>
#include <math.h>

static double
round3(double r)
{
	r *= 1000.0;
	r = round(r);
	return (r / 1000.0);
}

int
main(void)
{
	char line[80];
	double a;
	double b;
	double c;
	double d;
	double e;
	double f;
	double x;
	double y;

	while (gets(line)) {
		if (sscanf(line, "%lf %lf %lf %lf %lf %lf",
				   &a, &b, &c, &d, &e, &f) == 6) {
			x = (c/a - (b*f)/(a*e))*((a*e)/(a*e - b*d));
			y = f/e - (d/e) * x;
			
			printf("%.3f %.3f\n", round3(x), round3(y));
		}
	}

	return 0;
}