#include <iostream>
#include <iomanip>
#include <math.h>
using namespace std;

float gcd(float &m, float &n) {
	int a, b, t;
	a = (int)m;
	b = (int)n;
	while (1) {
		if (b==0) return (float)a;
		t = b;
		b = a % b;
		a = t;
	}
}

int main() {
	float a, b, c, d, e, f;
	float t, u, v;
	float x, y;
	
	while (1) {
		cin>>a>>b>>c>>d>>e>>f;
		if (cin.eof()) break;

		if ((a<0.0 && d<0.0) || (a>=0.0 && d>=0.0)) {
			t = a * d / gcd(a, d);
			u = t / a;
			b *= u;
			c *= u;
			u = t / d;
			e *= u;
			f *= u;
			y = (c - f)/(b - e);
			x = c - b * y;
		} else if (a<0.0 && d>=0.0) {
			a *= -1;
			b *= -1;
			c *= -1;
			t = a * d / gcd(a, d);
			u = t / a;
			b *= u;
			c *= u;
			u = t / d;
			e *= u;
			f *= u;
			y = (c - f)/(b - e);
			x = c - b * y;
		} else {
			d *= -1;
			e *= -1;
			f *= -1;
			t = a * d / gcd(a, d);
			u = t / a;
			b *= u;
			c *= u;
			u = t / d;
			e *= u;
			f *= u;
			y = (c - f)/(b - e);
			x = c - b * y;
		}

		cout<<setprecision(3)<<setiosflags(ios::fixed)<<x<<" "<<y<<endl;
	}
	return 0;
}