#include <stdio.h>
#include <stdlib.h>

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