#include <iostream>
#include <iomanip>

int main()
{
	int a[6];
	double x, y;
	for (int i = 0; i < 6; ++i)
		std::cin >> a[i];

	y = (double)(a[0] * a[5] - a[2] * a[3]) / (double)(a[0] * a[4] - a[1] * a[3]);
	x = (double)(a[5] - a[4] * y) / (double)a[3];

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

	return 0;
}