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

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