#include<iostream>
#include<iomanip>
#include<string>
#include<algorithm>
#include<functional>
#include<vector>
#include<math.h>
#define L(_i,_N) for(int _i=0;_i<_N;_i++)
#define C(_Dis) cout<<_Dis<<endl;
typedef long long int lli;
using namespace std;

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