#include <iostream>
using namespace std;

int main() {
	double a , b, c, d, e, f, x, y;
	cin >> a >> b >> c >> d >> e >> f;
	a *= 1000;
	b *= 1000;
	c *= 1000;
	d *= 1000;
	e *= 1000;
	f *= 1000;
	y = (d * c - a * f) / (d * b - a * e);
	x = (c - b * y) / a;
	cout << x / 1000 << " " << y / 1000 << endl;
	return 0;
}