#include <iostream>
using namespace std;

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

	while(cin >> a >> b >> c >> d >> e >> f){
		float x, y;
		x = 1.0*(b*f - c*e)/(b*d -a*e);
		y = 1.0*(c - a*x)/b;
		cout << x << " " << y << endl;
	}
	return 0;
}