#include <iostream>
#include <iomanip>

int main(void) {
	using namespace std;
	int a, b, c, d, e, f, x, y;
	while (std::cin >> a >> b >> c >> d >> e >> f) {
		x = (double)(f*b - e*c) / (d*b - e*a);
		y = (double)(f*a - d*c) / (e*a - d*b);
		cout << fixed << setprecision(3)<< x << ' ' << y << endl;
	}

	return 0;
}