#include<iostream>
#include<iomanip>

using namespace std;

int main(){
	cout << setprecision(3) << setiosflags(ios::fixed);
	double x[2];
	double y[2];
	for(int h = 0; h < 2; ++h){
		double a, b, c, d, e, f;
		cin >> a >> b >> c >> d >> e >> f;
		x[h] = (c*e-f*b)/(a*e-d*b);
		y[h] = (c*d-f*a)/(b*d-a*e);
	
		}
	
	cout << x[0] << " " << y[0] << '\n';
	cout << x[1] << " " << y[1] << '\n';
	return 0;
}