#include<cstdio>

using namespace std;

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 x,y,A;
		A = (a*e)-(b*d);
		b *= -1;
		d *= -1;
		
		x = (e*c+b*f)/A;
		y = (d*c+a*f)/A;
	
	printf("%.3lf %.3lf\n",x,y);
		}
	return 0;
}