#include <iostream>
#include <cstdio>
using namespace std;

int main() {
	double x,y,a,b,c,d,e,f;
	while(6 == scanf("%lf %lf %lf %lf %lf %lf",&a,&b,&c,&d,&e,&f)){
		x = (-b*f+e*c)/(a*e-b*d);
		y = (f-d*x)/e;
		if(x == 0){
        	x = 0.000;
	    }
		if(y == 0){
        	y = 0.000;
		}

		printf("%.3lf %.3lf\n",x,y);
	}
	return 0;
}