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

using namespace std;

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