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

int main(){
	while (1){
		double a, b, c, d, e, f;
		cin >> a >> b >> c >> d >> e >> f;

		double x = (c*e - f*b) / (a*e - b*d);
		cout << fixed << setprecision(3)<< x << " "<< setprecision(3)<< (c - a*x) / b;
	}

	return 0;
}