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

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