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

int main(){
	int i = 0;
	double a, b, c, d, e, f;
	double x, y;
	while (cin >> a >> b >> c >> d >> e >> f){
		
		x = (c*e - f*b) / (a*e - b*d);
		y = (c - a*x) / b;
		cout << fixed << setprecision(3) << x + 0.0001 << " " << setprecision(3) << y + 0.0001 << '\n';
	}

	return 0;
}