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

	int main(){

		double a,b,c,d,e,f;
		while(cin>>a>>b>>c>>d>>e>>f)
		{
			double tx,ty;

			tx = (1.0*(c*e - b*f) / (e*a - b*d));
			ty = (1.0*(d*c - a*f) / (b*d - a*e));

			if(tx>=0){
			tx+=0.0004;
		}
		else{
			tx-=0.0004;
		}
		if(ty>=0){
		   ty+=0.0004;
		}
		else{
			ty-=0.0004;
		}

			cout<<setprecision(3) << setiosflags(ios::fixed)<< tx<<" "<<ty<<endl;
		}
	

		
		return 0;
	}