#include<iostream>
#include<iomanip>

using namespace std;

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

	cout << (c*e-f*b)/(a*e-d*b) << " " << (c*d-f*a)/(b*d-a*e) << '\n';

	}
	return 0;
}