#include<iostream>
#include<iomanip>
#include <math.h>
double    round4(double src, int n){
	double dst;
	dst = src * pow(10, -n - 1);
	dst = (double)(int)(dst + 0.5);
	return    dst * pow(10, n + 1);
}

int main(){

	double a, b, c, d, e, f;
	double x, y;
	while (std::cin >> a >> b >> c >> d >> e >> f){
		if (a*d<0){
			d = -d;
			e = -e;
			f = -f;
		}

		x = (c - b*(c - f*a / d) / (b - e*a / d)) / a;
		y = (c - f*a / d) / (b - e*a / d);
		if (x == 0)x = 0;
		if (y == 0)y = 0;
		round4(x, 4);
		round4(y, 4);
		std::cout<<std::fixed<<std::setprecision(4)  << x << " " << y << std::endl;
	}
	return 0;
	
}