#include<iostream>
#include<iomanip>
using namespace std;
int main()
{
	int a,b,c,d,e,f;
	double x,y;
	while(cin>>a)
	{
		cin>>b>>c>>d>>e>>f;
		y = (double)((c*d-a*f)/(b*d-a*e));
		x = (double)((c*e-b*f)/(a*e-b*d));
		cout<<setprecision(3)<<setiosflags(ios::fixed|ios::showpoint)<<x<<' '<<y<<endl;
	}
	return 0;
}