#include <cstdio>
#define abs(x) (x>0?x:-x)

int main(){
	int a,b,c,d,e,f;
	double g,x,y;

	while(scanf("%d %d %d %d %d %d",&a,&b,&c,&d,&e,&f)!=EOF){
		g=a*e-b*d;
		x=e*c+(-b)*f;
		y=(-d)*c+a*f;
		x=(x==0?0.000:x/g);
		y=(y==0?0.000:y/g);
		printf("%.3lf %.3lf\n",x,y);
	}
	return 0;
}