#include<stdio.h>
int main(void) {
	double a, b, c, d, e, f, xans, yans;
	while (scanf("%lf %lf %lf %lf %lf %lf", &a, &b, &c, &d, &e, &f) != EOF)
	{
		xans = ((e*c - f*b) / (a*e - d*b)) + 0.0005;
		yans = ((c*d - f*a) / (d*b - a*e)) + 0.0005;
		printf("%.3f %.3f\n", xans, yans);
	}
	return 0;
}