#include <stdio.h>

int main(void){
	double a,b,c,d,e,f;
	double ans_x,ans_y;
	while(scanf("%lf %lf %lf %lf %lf %lf",&a,&b,&c,&d,&e,&f) != EOF){
		ans_y = (c*d-a*f) / (b*d-a*e);
		ans_x = (c - (b*ans_y)) / a;

		printf("%.3lf %.3lf\n",ans_x,ans_y);
	}

	return 0;
}