#include<stdio.h>

int main(void)
{
	double a, b, c, d, e, f, x, y;
	double result[10000][2];
	int i, j;
	
	i = 0;
	
	while (scanf("%lf %lf %lf %lf %lf %lf", &a, &b, &c, &d, &e, &f) != EOF) {
		x = ((b * f) + (-1 * e * c)) / ((b * d) + (-1 * a * e));
		
		y = ((a * f) + (-1 * d * c)) / ((a * e) + (-1 * b * d));
		
		result[i][0] = x;
		result[i][1] = y;
		
		i++;
	}
	
	for (j = 0; j < i; j++) {
		printf("%lf %lf\n", result[j][0], result[j][1]);
	}
	
	return (0);
}