#include <iostream>
#include <vector>
#include <algorithm>
#include <functional>
#include <iomanip>

using namespace std;

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