#include <stdio.h>

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