#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=(c*e-b*f)/(a*e-d*b);
		y=(d*c-a*f)/(d*b-a*e);
		x=(2*x+(1/1000))/2;
		y=(2*y+(1/1000))/2;
		printf("%0.3f %0.3f\n",x,y);
	}
}