#include <iostream>

using namespace std;

int main()
{
	int a,b,c,d,e,f;
	float x,y,dx,dy;
	while( cin >> a >> b >>c >>d >> e >> f ) {
		x = (c*e-b*f)/(float)(a*e-b*d);
		y = (float)c/b - (float)a /b * x;
		
		dx =x -  (x / 0.001)*0.001;
		if( dx >= 0.0005)
			x = (x / 0.001)*0.001 + 0.001;
		else
			x = (x / 0.001)*0.001;

		dy =y -  (y / 0.001)*0.001;
		if( dy >= 0.0005)
			y = (y / 0.001)*0.001 + 0.001;
		else
			y = (y / 0.001)*0.001;
	
		printf("%.3f %.3f\n",x,y);
	}



	return 0;
}