/* ?°???°????????? */
#include <iostream>
#include <cmath>
#include <string>
using namespace std;

int main(){
	float x, y;
	int a, b, c, d, e, f, xx, yy;
	string p, q;
	while (true){
		cin >> a >> b >> c >> d >> e >> f;
		if (cin.eof()){
			break;
		}
		if (a == 0){
			y = c / b;
			x = (f - e * y) / d;
		}
		else if (b == 0){
			x = c / a;
			y = (f - d * x) / e;
		}
		else if(d == 0){
			y = f / e;
			x = (c - b * y) / a;
		}
		else if(e==0){
			x = f / d;
			y = (c - a * x) / b;
		}
		else{
			x = (c*e - b*f) / (e*a - b*d);
			y = (c - a*x) / b;
		}
		xx = x / 1;
		yy = y / 1;
		p = to_string(xx);
		q = to_string(yy);
		p += ".";
		q += ".";
		b = x * 10;
		c = y * 10;
		for (int i = 1;i<4;i++){
			p += to_string((b*10) % 10);
			q += to_string((c*10) % 10);
			x = x * 10;
			y = y * 10;
			b = x;
			c = y;
		}
		cout << p << " " << q << endl;
	}
	return 0;
}