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

int main(){
	double x,y;
	int a,b,c,d,e,f;

	while(scanf("%d %d %d %d %d %d", &a,&b,&c,&d,&e,&f) != EOF){
		x = (e*c - b*f)/(a*e - b*d);
		y = (f/e) - (d/e)*x;

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

	return 0;
}