#include <iostream>
#include <iomanip>
#include <list>
#include <map>
#include <algorithm>
#include <stack>

using namespace std;

int main(){
	double a = 0,b = 0,c = 0,d = 0,e = 0,f = 0;
	double x = 0,y = 0;
	while(cin >> a >> b >> c >> d >> e >> f){
		if(((f - (e * c / b)) * b) == 0){
			x = 0;
		}
		else{
			x = (f - (e * c / b)) * b / ((b * d) - (e * a));
		}
		y = (c - (a * x)) / b;
		cout << fixed;
		cout.precision(3);
		cout << x << " " << y << endl;
	}
	return 0;
}