#include <bits/stdc++.h>
#define rep(i,n) for(int i=0; i<(int)(n); i++)

using namespace std;
using LL = long long;
using P = pair<int,int>;

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

	return 0;
}