#include <math.h>
#include <iostream>
#include <iomanip>

using namespace std;

int main()
{
	double a, b, c, d, e, f;
	while(cin >> a >> b >> c >> d >> e >> f)
	{
		double x = (c - b*f/e) / (a - b*d/e);
		double y = (c - a*x) / b;

		

		cout << setiosflags(ios::fixed) << setprecision(3);
		cout << x << " " << y << endl;
	}
	return 0;
}