#include <iostream>

using namespace std;

#define EPS 1e-9

int main()
{
	int a,b,c,d,e,f;
	double x,y,dx,dy;
	while( cin >> a >> b >>c >>d >> e >> f ) {
		x = (c*e-b*f)/(double)(a*e-b*d);
		y = (c*d-a*f)/(double)(b*d-a*e);
		

		printf("%.3f %.3f\n",x+EPS,y+EPS);
	}



	return 0;
}