#include <iostream>
#include <stdio.h>

using namespace std;

int main(int argc, char const* argv[])
{
	double a,b,c,d,e,f,x,y;

	while(cin >> a >> b >> c >> d >> e >> f){
		double det = 1/(a * e - b * d);

		x = ( c * e - b * f ) * det;
		y = ( a * f - c * d ) * det;


		x *= 1000;
		y *= 1000;
		x = int( x+.5-(x<0) );
		y = int( y+.5-(y<0) );
		y /= 1000;
		x /= 1000;
		printf("%.3f %.3f\n",x,y);
	}
	return 0;
}