#include<stdio.h>
int main(void){
	int a,b,c,d,e,f;
	while(scanf("%d%d%d%d%d%d",&a,&b,&c,&d,&e,&f)){
	
	double y=(c*d-a*f)/(b*d-a*e);
	double x=(a*e-b*d)/(c*e-b*f);
	printf("%.3f %.3f\n",((int) x*10000%10<5)?x:x+0.001,((int)y*10000%10<5)?y:y+0.001);
	}
	return 0;
}