#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
	
	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) x = ceil(x * 1000 - 0.5) / 1000;			//xð¬_ælÊÅlÌÜü(ÌÌê)(1000{¨0.5ðø­¨¬_Øã°¨1/1000{)
		else x = floor(x * 1000 + 0.5) / 1000;				//xð¬_ælÊÅlÌÜü(³ÌÌê)(1000{¨0.5ð«·¨¬_ØÌÄ¨1/1000{)
		if(y < 0) y = ceil(y * 1000 - 0.5) / 1000;			//xð¬_ælÊÅlÌÜü(ÌÌê)
		else y = floor(y * 1000 + 0.5) / 1000;				//xð¬_ælÊÅlÌÜü(³ÌÌê)
		
		printf("%.3f %.3f\n", x, y);						//x, yðoÍ
	}
	
	return 0;
}