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

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

	while ( cin >> a >> b >> c >> d >> e >> f ){

		y = ( c * d  - a * f ) / ( b * d - a * e );
		if ( a ){
			x = ( c - b * y ) / a;
		}else{
			x = ( f - e * y ) / d;
		}

		cout << showpoint << setprecision(3);
		cout << setiosflags( ios::fixed );
		cout << ( x == -0.0 ? 0.0 : x ) << " " << ( y == -0.0 ? 0.0 : y ) << endl;

	}
}