#include<iostream>
#include<cstdio>
#include<utility>
#include<climits>
#include<cmath>
using namespace std;

int main()
{
	//ax + by = c
	//dx + ey = f

	double a, b, c, d, e, f;
	double x, y;

	while (cin >> a >> b >> c >> d >> e >> f)
	{
		y = (a * f - c * d) / (a * e - b * d);
		x = -b / a * y + c / a;
		printf("%.3lf %.3lf\n", x, y);
	}
	return 0;
}