#include <stdio.h>
#include <math.h>

int main( void )
{
	float a,b,c,d,e,f;
	while( scanf( "%f %f %f %f %f %f", &a, &b, &c, &d, &e, &f ) )
	{
		if( feof( stdin ) ) break;
		float det = 1.0f / ( a*e - b*d );
		float x = det * ( e*c - b*f );
		float y = det * ( -c*d + a*f );
		if( fabs( x ) < 0.001f ) x = 0.0f;
		if( fabs( y ) < 0.001f ) y = 0.0f;
		printf( "%.3f %.3f\n", x, y );
	}
	return 0;
}