#include <iostream>
using namespace std;
int main () {
	double m[4], e, f, d;
	cout.setf (ios::fixed); cout.precision (3);
	while (cin >> m[0] >> m[1] >> e >> m[2] >> m[3] >> f) {
		d = m[0]*m[3] - m[1]*m[2];
		cout << ((m[3]*e-m[1]*f)/d) << " " << ((m[0]*f-m[2]*e)/d) << endl;
	}
}