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

int main(){

	float a, b, c, d, e, f;

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

		float det = a * e - b * d;

		float dx = c * e - b * f;
		float dy = a * f - c * d;

		float x = dx / det;
		float y = dy / det;

		if( x == -0.000 )x = 0.000;
		if( y == -0.000 )y = 0.000;

		cout << fixed << setprecision(3) << x << " " << y << endl;
	}

	return 0;
}