#include <stdio.h>

int main(void){
	float a,b,c,d,e,f,x,y;
	while(scanf("%f %f %f %f %f %f",&a,&b,&c,&d,&e,&f)!=EOF){
		x=(c-((b*f)/e))/(a-((b*d)/e));
		y=(c-(a*x))/b;
		printf("%.3f %.3f\n",x,y);
	}
}