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

using namespace std;

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

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

		x = ( e * c - b * f ) / hoge;
		y = ( -c * d + a * f ) / hoge;

		x *= 1000;
		if( x >= .5 ) x = int(x+.5-(x<0));
		else x = int(x);
		x /= 1000;

		y *= 1000;
		if( y >= .5) y = int(y+.5-(y<0));
		else y = int(y);
		y /= 1000;


		printf("%1.3f %1.3f\n", x, y );
	}

	return 0;

		
}