#include <cstdio>
using namespace std;

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