#include<iostream>
#include<iomanip>

using namespace std;

int main()
{
	float a,b,c,d,e,f,x,y,z,q,p;
	
	while(1){
		cin>>a>>b>>c>>d>>e>>f;
		z=a/d;
		d*=z,e*=z,f*=z;
		q=b-e;
		p=c-f;
		y=p/q;
		x=a/(c-(b*y));
		cout<<fixed<<setprecision(3)<<x<<" "<<y<<endl;
			
	}
	return 0;
}