#include<iostream>
#include<iomanip>

using namespace std;

int main()
{
	float a, b, c, d, e, f;
	float copya, copyb, copyc;
	float odd;//倍率
	float x, y;

	while (cin >> a >> b >> c >> d >> e >> f)
	{
		copya = a, copyb = b, copyc = c;

		odd = a / d;

		d *= odd, e *= odd, f *= odd;

		a -= d, b -= e, c -= f;

		y = c / b;
		x = (copyc - copyb*y) / copya;

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

	}


	return 0;
}
