#include <cstdio>
#include <iostream>
#include <iomanip>

int main() {
	float a, b, c, d, e, f;
	while (std::cin >> a >> b >> c >> d >> e >> f) {
		float
			x = (c * e - b * f) / (a * e - b * d),
			y = (c * d - a * f) / (b * d - a * e);

		std::cout << std::fixed << std::setprecision(3) << x << " " << std::fixed << std::setprecision(3) << y << std::endl;

	}
}