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

int main() {
	int number[6];
	double x, y;
	while (cin 
		>> number[0] >> number[1] >> number[2]
		>> number[3] >> number[4] >> number[5]) {
		y = (number[2] * number[3] - number[0] * number[5])
			/ (number[1] * number[3] - number[0] * number[4]);
		x = (number[2] - number[1] * y) / number[0];
		cout << fixed << setprecision(3) << x << flush;
		cout << " " << flush;
		cout << fixed << setprecision(3) << y << endl;
	}
	return 0;
}
