#include <bits/stdc++.h>
using namespace std;

int main(void) {
	int a, b, c, d, e, f;
	cout << fixed << setprecision(3);
	while (scanf("%d %d %d %d %d %d", &a, &b, &c, &d, &e, &f) != EOF) {
		double x = (double)(c * e - f * b) / (a * e - d * b);
		if (abs(x) < 0.001) x = 0;
		double y = (c - a * x) / b;
		cout << x << " " << y << endl;
	}
}
