#include <iostream>
#include <iomanip>
using namespace std;

int main()
{
	double A, B, C, D, E, F, X, Y, G , H;

	while(cin >> A >> B >> C >> D >> E >> F)
	{
		G = A / D;
		D *= G;
		E *= G;
		F *= G;
		Y = (F-C) / (E-B);
		
		D /= G;
		E /= G;
		F /= G;
		H = B / E;
		D *= H;
		E *= H;
		F *= H;
		X = (F-C) / (D-A);

		if(static_cast<int>(Y*100000)%100>=49 && static_cast<int>(Y*100000)%100<=50 && Y<0){
			Y += 0.0001;
		}

		if(static_cast<int>(-1*X*100000)%100>=49 && static_cast<int>(-1*X*100000)%100<=50 && X<0){
			X += 0.0001;
		}

		if(Y>-0.0005 && Y<=0.0){
			Y=0;
		}

		if(X>-0.0005 && X<=0.0){
			X=0;
		}

		cout<<fixed<<setprecision(3)<<X<<" "<<fixed<<setprecision(3)<<Y<<endl;
	}

	return 0;
}