#include <iostream>
#include <iomanip>
#include <math.h>

using namespace std;

int main(void) {
	while(1) {
		int a, b, c, d, e, f;
		double x, y;
		cin >> a >> b >> c >> d >> e >> f;
		if(cin.eof()) break;

		x = (double)(e * c - b * f) / (a * e - b * d);
		y = (double)(a * f - d * c) / (a * e - b * d);
		if(x == 0) { x = 0; }
		if(y == 0) { y = 0; }

		cout << fixed << setprecision(3) << x << " " << y << endl;
	}
	return 0;
}