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

int gcd(int g,int h){
	if(h == 0)
		return g;
	return gcd(h, g % h);
}

int main(){
	cin.tie(0);
	ios::sync_with_stdio(false);
	
	int a, b, c, d, e, f;
	while(cin){
		cin >> a >> b >> c >> d >> e >> f;
		
		int g = f * b - c * e;
		int h = b * d - a * e;
		double x = (g / gcd(g, h)) / (h / gcd(g, h));
		int i = f * a - d * c;
		int j = -d * b + e * a;
		double y = (i / gcd(i, j)) / (j / gcd(i, j));
		cout << fixed << setprecision(3) << x << " " << y << endl;
	}
	return 0;
}