#define _CRT_SECURE_NO_WARNINGS

#include <stdio.h>
#include <string.h>
#include <stdlib.h>

int main(void) {
	char string[54];
	double a, b, c, d, e, f, x, y;
	scanf("%s",string);
	
	a = atof(strtok(string, " "));
	b = atof(strtok(NULL, " "));
	c = atof(strtok(NULL, " "));
	d = atof(strtok(NULL, " "));
	e = atof(strtok(NULL, " "));
	f = atof(strtok(NULL, " "));

	x = (f*b - e*c) / (d*b - e*a);
	y = (f*a - d*c) / (e*a - d*b);

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