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

int main(void) {
	float a,b,c,d,e,f,a2,d2;
	double ansx,ansy;
	while(scanf("%f %f %f %f %f %f",&a, &b, &c, &d, &e, &f) != EOF){
		a2 = (a) * (d);
		b = (b) * (d);
		c = (c) * (d);
		d2 = (d) * (a);
		e = (e) * (a);
		f = (f) * (a);
		b = (b) - (e);
		c = (c) - (f);
		ansy = (c) / (b);
		ansx = (f - (e) * (ansy)) / (d);
		ansy = ansy + 0.0005;
		ansy = ansy * 1000;
		ansy = floor(ansy);
		ansy = ansy / 1000;
		ansx = ansx + 0.0005;
		ansx = ansx * 1000;
		ansx = floor(ansx);
		ansx = ansx / 1000;
		printf("%f %f\n",ansx,ansy);
	}
	return 0;
}