#include <iostream>
#include <cstdio>
#include <math.h>
using namespace std;

int main() {
	double a, b, c, d, e, f, x, y;
	while(cin >>a >>b >>c >>d >>e >>f){
		x = (b*f - c*e) / (b*d - a*e);
		y = (f-(d*x))/e;
		x = (double)(int)(((x * 1000) + (0.5f - (x < 0)))) / 1000;
		y = (double)(int)(((y * 1000) + (0.5f - (y < 0)))) / 1000;
		printf("%.3f %.3f\n", x, y);
	}
	return 0;
}