#include <stdio.h>

int main(void)
{
	int a, b, c, d, e, f;
	double x, y;
	
	while(scanf("%d %d %d %d %d %d", &a, &b, &c, &d, &e, &f) != EOF){
		if(e*a > b*d){		
			x = (e*c - b*f) / (e*a - b*d);
			y = (d*c - a*f) / (e*a - b*d);
		}
		else{
			x = (e*c - b*f) / (b*d - e*a);
			y = (d*c - a*f) / (b*d - e*a);
		}

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