#include <cstdio>
#include <queue>
#include <vector>

using namespace std;


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