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

int main()
{
	while (1==1)
	{
		double a,b,c,d,e,f;
		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;
	}
}