#include <bits/stdc++.h>
#include <vector>
using namespace std;
double a, b, c, d, e, f, x, y;
int main(){
	while(cin >> a >> b >> c >> d >> e >> f){
		x = (c*e - b*f)/(e*a - b*d);
		y = (c*d - a*f)/(d*b - a*e);
		if(x == -0)
			x = 0;
		if(y == -0)
			y = 0;
		cout << fixed << setprecision(3) << x << " " << y << "\n";
	}
	return 0;
}