#include <cstdio>
int main() {
	int a,b,c,d,e,f;
	while(scanf("%d %d %d %d %d %d",&a,&b,&c,&d,&e,&f)!=EOF) {
		double y=(double)(c*d-a*f)/(b*d-a*e);
		double x=(c-b*y)/a;
		printf("%.3lf %.3lf\n",x,y);
	}
}