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

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

	while( cin >> a >> b >> c >> d >> e >> f ) {
		double x, y;

		y = ( c * d  - a * f ) / ( b * d - a * e );
		x = ( c - b * y ) / a ;

		cout << (x == 0 ? setprecision(3) : setprecision(4)) << showpoint << x;
		cout << " " << (y == 0 ? setprecision(3) : setprecision(4)) << y << endl;
	}
}