#include <cmath>
#include <cstdlib>
#include <iostream>
using namespace std;

int main() {
	cin.tie(nullptr);
	ios::sync_with_stdio(false);
	cout.setf(ios::fixed);
	cout.precision(3);

	constexpr double EPS = 1e-7;

	for(double a, b, c, d, e, f; cin >> a >> b >> c >> d >> e >> f;) {
		double x, y;
		if(abs(e) < EPS) {
			x = (f - c * e / b) / (d - a * e / b);
			y = (c - a * x) / b;
		}
		else {
			x = (c - f * b / e) / (a - d * b / e);
			y = (f - d * x) / e;
		}

		cout << x << " " << y << endl;
	}

	return EXIT_SUCCESS;
}