#include <stdio.h>

double dc4pi5(double arg,int n){
	int i = 0;
	for(i = 0;i < n;i++){
		arg *= 10;
	}
	int tmp = (int)arg;
	double ret = tmp;
	if(tmp % 10 <= 4){
		ret -= tmp % 10;
	}else{
		ret += 10 - tmp % 10;
	}
	for(i = 0;i < n;i++){
		ret /= 10;
	}
	return ret;
}

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