#include<iostream>
#include<string>
#include<vector>
#include<algorithm>
#include <functional>
#include <iomanip>
using namespace std;

#define rep(p,q) for(int i = p; i < q;i++)

int main(void) {
	double a, b, c, d, e, f;
	cout << fixed;
	while (cin >> a >> b >> c >> d >> e >> f) {
		double y = (d*c - a*f) / (b*d - a*e);
		double x = (c - b*y) / a;
		
		cout << setprecision(3) << round(x * 1000) / 1000 << " "<< setprecision(3) << round(y * 1000) / 1000 << endl;
	}
}

