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

int main(void)
{
	double a, b, c, d, e, f;

	while(cin >> a >> b >> c >> d >> e >> f){
		double z = a * e - b * d;

		cout << fixed << setprecision(3) << (c * e - b * f) / z << " " << (a * f - c * d) / z << endl;
	}

	return 0;
}