#include <iostream>
#include <cstdio>

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

	return 0;
}