#include<iostream>
#include<iomanip>

using namespace std;

int main()
{
	double a, b, c, d, e, f;
	double x, y;
	double odd;

	while (cin >> a >> b >> c >> d >> e >> f)
	{
		odd = b / e;

		x = (c - odd*f) / (a - odd*d);
		y = (c - a*x) / b;

		cout << fixed << setprecision(3);
		cout << x << " " << y << endl;

	}


	return 0;
}
