#include<iostream>
#include<cmath>
#include<cstdio>
using namespace std;

int main(){
	double aa, bb, cc, a, b, c, d, e, f, x, y;				//®1:ax + by = c, ®2:dx + ey = f
	int xx, yy;
	
	while(cin >>a >>b >>c >>d >>e >>f){						//EOFªüÍ³êéÜÅ[v
		aa = a; bb = b; cc = c;								//üÍ³ê½a, b, cÌlðÛ
		
		b /= a; c /= a; a /= a;								//®1F¼ÓðaÅé
		e /= d; f /= d; d /= d;								//®2F¼ÓðdÅé
		
		b -= e; c -= f;										//®1©ç®2ðø­, ÊÍ®1ÌÏÖ
		
		y = c / b;											//15sÚÌÊ©çyðvZ
		x = (cc - (bb * y)) / aa;							//®1ÉyðãüµxðvZ
		
		if(x < 0){xx = (int)x * 1000 - 0.5; x = xx; x /= 1000;}
		else xx = (int)x * 1000 + 0.5; x = xx; x /= 1000;		//xð¬_ælÊÅlÌÜü(1000{¨0.5ð«·¨int^ÉµÄ¬_ØÌÄ¨double^É¼µÄ1/1000{)
		if(y < 0){yy = (int)y * 1000 - 0.5; y = yy; y /= 1000;}		//yð¯ã
		else yy = (int)y * 1000 + 0.5; y = yy; y /= 1000;
		
		printf("%.3f %.3f\n", x, y);						//x, yðoÍ(printf)
	}
	
	return 0;
}