#include<iostream>

using namespace std;

int main()
{
	double ax,by,c,dx,ey,f,x1,x2,x,y;
	
	for(;cin >> ax >> by >> c >> dx >> ey >> f;)
	{
		
		x1=by/ax;
		x2=c/ax;
		y=(f-dx*x2)/(ey-dx*x1);
		x=x2-x1*y;
		
		printf("%.3f %.3f\n",x,y);
	}
}