#include<iostream>
#include<iomanip>

double Cut(double figure,int keta)
{
	for(int i=0; i<keta+1; ++i)
	{
		figure *= 10.0;
	}

	int figureI = figure;

	figureI = figureI-figureI%10+(figureI%10>=5 ? 10 : 0);//四捨五入　一回1の桁を0として、1の位が5以上なら〜と場合分け

	figure = figureI;

	for(int i=0; i<keta+1; ++i)
	{
		figure /= 10.0;
	}

	return figure;
}

int main()
{
	std::cout << std::setprecision(3);//小数点以下の”表示”桁数
	
	std::cout << std::setiosflags(std::ios::fixed);
	
	double a,b,c,d,e,f;

	while(std::cin >> a >> b >> c >> d >> e >> f)
	{
		double x = (c*e-b*f)/(a*e-b*d);

		double y = (c*d-a*f)/(b*d-a*e);

		std::cout << Cut(x,3) << ' ' << Cut(y,3) << '\n';
	}
	
}