/* Blaces() are very important. */
/* It calls the memory from LISP world. :-) */

#include <stdio.h>

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