#include<iostream>
#include<iomanip>

int main()
{
	double a, b, c, d, e, f;
	while (std::cin >> a >> b >> c >> d >> e >> f)
	{
		std::cout << std::fixed << std::setprecision(3)
			<< (c * e - b * f) / (a * e - b * d) << " "
			<< (c * d - a * f) / (b * d - a * e) << std::endl;
	}

	return 0;
}
