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

double is(double n)
{
	double mammad=n*1000;
	int mammadd=(int)mammad;
	return (double)mammadd / 1000.00;
}

int main()
{
	double a,b,c,d,e,f;
		
	while (cin>>a>>b>>c>>d>>e>>f)
	{
		double y=(c-((a/d)*f))/(b-((a/d)*e));
		double x=((c)-(b*y))/(a);
		
	
	//	cout<<setprecision(3) << fixed<<x<<" "<<setprecision(3) << fixed<<y<<endl;
		cout<<setprecision(3)<<fixed<<is(x)<<" "<<setprecision(3)<<fixed<<is(y)<<endl;
	
	}
}