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

int main()
{
	double a,b,c,d,e,f;
	double x,y;
	int count = 0;
	vector<double> result_x,result_y;

	while(cin >> a >> b >> c >> d >> e >> f) {
		y = (a * f - c * d) / (a * e - b * d);
		x = (c - b * y) / a;
		result_y.push_back(y);
		result_x.push_back(x);
		cout << result_x[count] << ' ' << result_y[count] << endl;
		count++;
	}

	return 0;
}