#include <stdio.h>

int main(void){
	int a,b,c,d,e,f;
	float x,y;
	while(scanf("%d %d %d %d %d %d",&a,&b,&c,&d,&e,&f)!=EOF){
		x=1.0*(c*e-b*f)/(a*e-d*b)+0.0;
		y=1.0*(d*c-a*f)/(d*b-a*e)+0.0;
		printf("%.3lf %.3lf\n",x,y);
	}
}