#include <stdio.h>
#include <iostream>

using namespace std;

double ansX[10000], ansY[10000];

int main(int argc, char* argv[])
{
	int count = 0;
	double a, b, c, d, e, f;
	double b1, c1, e1, f1;

	while (1) {
		cin >> a >> b >> c >> d >> e >> f;
		if (cin.eof()) break;

		b1 = b * d;
		c1 = c * d;
		e1 = e * a;
		f1 = f * a;

		if (b1 == e1) continue;
		ansY[count] = (c1 - f1) / (b1 - e1);
		ansX[count] = (c - b * ansY[count]) / a;
		count++;
	}

	for (int i = 0; i < count; i++) {
		printf("%.3f %.3f", ansX[i], ansY[i]);
	}
	
	return 0;
}