#include <iostream> 
#include <cstdio>
using namespace std;
const int n = 10000100;
double a[n], b[n], c[n], d[n], e[n], f[n], x[n], y[n]; 
int main () {
	int count = 1;
	while (cin >> a[count] >> b[count] >> c[count] >> d[count] >> e[count] >> f[count]) count++;

	for (int i = 1; i < count; i++) {
		x[i] = (c[i] * e[i] - b[i] * f[i]) / (a[i] * e[i] - b[i] * d[i]);
		y[i] = (a[i] * f[i] - c[i] * d[i]) / (a[i] * e[i] - b[i] * d[i]);
		x[i] = (int)(1000 * x[i] + 0.5) / 1000;
		y[i] = (int)(1000 * y[i] + 0.5) / 1000;
		printf ("%.3f %.3f\n", x[i], y[i]);
	}
	
	return 0;
}