#include<cstdio>
using namespace std;
int main(void){
	int a,b,c,d,p,q;
	double x,y;
	while(scanf("%d%d%d%d%d%d",&a,&b,&p,&c,&d,&q)!=EOF){
		x=(double)(d*p-b*q)/(a*d-b*c);
		y=(double)(c*p-a*q)/(b*c-a*d);
		if(-0.001<x&&x<0.001)	x=0;
		if(-0.001<y&&y<0.001)	y=0;
		printf("%.3lf %.3lf\n",x,y);
	}
	return 0;
}
