#include <iostream>
#include <vector>
#include <iomanip>
using namespace std;

int main() {
	vector<int> a(1), b(1), c(1), d(1), e(1), f(1);
	int cnt=0;
	while(cin >> a[cnt] >> b[cnt] >> c[cnt] >> d[cnt] >> e[cnt] >> f[cnt]) {
		cnt++;
		a.push_back(0);
		b.push_back(0);
		c.push_back(0);
		d.push_back(0);
		e.push_back(0);
		f.push_back(0);
	}
	a.pop_back();
	b.pop_back();
	c.pop_back();
	d.pop_back();
	e.pop_back();
	f.pop_back();

	vector<double> x(a.size()), y(a.size());

	for(int i=0; i<a.size(); i++) {
		y[i] = (a[i]*f[i]-c[i]*d[i])/(a[i]*e[i]-b[i]*d[i]);
		x[i] = (c[i]-b[i]*y[i])/a[i];
	}
	for(int i=0; i<a.size(); i++) cout << fixed << setprecision(3) << x[i] << " " << y[i] << endl;
	return 0;
}
