#include <cstdio>
#include <cstring>
#include <algorithm>

using namespace std;

int main()
{
	double a, b, c, d, e, f;
	while (scanf("%lf %lf %lf %lf %lf %lf", &a, &b, &c, &d, &e, &f) != EOF)
	{
		double x = (f-c*e/b)/(d-e*a/b);
		x = -0.001 < x && x <= -0 ? x = 0 : x;
		double y = (c-a*x)/b;
		printf("%.3f %.3f\n", x, y);
	}

	return 0;
}