#include <iostream>
#include <iomanip>
using namespace std;
int main() {
	double a, b, c, d, e, f;
	while (cin >> a >> b >> c >> d >> e >> f)
		cout << fixed << setprecision(3) << (c * e - b * f) / (a * e - b * d) + 0.00001 << ' ' << (c * d - a * f) / (b * d - a * e) + 0.00001 << endl;
}
