// R_triangle.cpp : 螳壻ケ画而蛻カ蜿ー蠎皮畑遞句コ冗噪蜈・蜿」轤ケ縲?//

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

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