#include<bits/stdc++.h>
using namespace std;

int main(){
	double a, b, c, d, e, f;
	while(cin >> a >> b >> c >> d >> e >> f){
		double x, y;
		y = (a * f - d * c) / (a * e - d * b);
		x = (c - b * y) / a;

		//小数点以下４桁で四捨五入して表示
		cout << fixed << setprecision(3) << x << " " << y << endl;
	}

	return 0;
}

