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

int main(){
	double a, b, c, d, e, f;
	cout << setprecision(3) << setiosflags(ios::fixed);

	while(cin >> a >> b >> c >> d >> e >> f){
		cout << (c*e-b*f)/(a*e-b*d) << " " << (c*d-a*f)/(b*d-a*e) << endl;
	}

	return 0;

}