// 解二元一次方程组 
#include<iostream>
#include<iomanip>
using namespace std;

int main() {
	double a,b,c,d,e,f,x,y;
	while (cin >> a >> b >> c >> d >> e >> f) {
		y = (a*f - c*d)/(a*e - b*d);
		x = (f - e*y)/d;
		if ( x == -0 ) {
			x *= -1;
		}
		if ( y == -0 ) {
			y *= -1;
		}
		cout << fixed <<setprecision(3)<< x <<" " << y << endl;	
	}
} 
