#include <iostream>

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)
		printf("%.3f %.3f\n", (e*c-f*b)/(e*a-b*d), (d*c-f*a)/(b*d-a*e));
	return 0;
}