#include <iostream>
#include <cstdio>

using namespace std;

int main() {
	double a, b, c, d, e, f;
	while (cin>>a>>b>>c>>d>>e>>f) {
		double mat = a * e - b * d;
		double dx = c * e - b * f;
		double dy = a * f - d * c;

		printf("%.3f %.3f\n", dx/mat, dy/mat);
	}
	return 0;
}