#include <stdio.h>

int main(void){
	int a, b, c, d, e, f;
	double alpha, beta;
	double x, y;
	double ratio;

	while(scanf("%d %d %d %d %d %d", &a, &b, &c, &d, &e, &f) != -1){
		

		ratio = -1 * ((double)d / (double)a);
		alpha = ratio * b;
		beta = ratio * c;
		//printf("%f %f %f\n", ratio, alpha, beta);

		y = (double)(beta + f) / (alpha + e);
		x = (double)(f - e * y) / d;

		if(x == 0){
			x = 0;
		}
		if(y == 0){
			y = 0;
		}

		printf("%.3f %.3f\n", x, y);
	}

	return 0;
}