#include <iomanip>
#include <iostream>

using namespace std;

/* ax + by = c ??????
   dx + ey = f ?????? ?????¢?????£???????¨???????
   
   (x, y) = { (ce - bf) / (ae - bd), (af - cd) / (ae - bd) } ??§?§£?????? */


void Equation2(int a, int b, int c, int d, int e, int f, double& x, double& y)
{
	x = (c * e - b * f) / (a * e - b * d);
	y = (a * f - c * d) / (a * e - b * d);
}

int main()
{
	int A[12];

	double X[2];
	double Y[2];

	for (int i = 0; i < 12; i++) { cin >> A[i]; }

	Equation2(A[0], A[1], A[2], A[3], A[4] , A[5] , X[0], Y[0]);
	Equation2(A[6], A[7], A[8], A[9], A[10], A[11], X[1], Y[1]);

	cout << fixed << setprecision(3) << X[0] << ' ' << Y[0] << endl
					   				 << X[1] << ' ' << Y[1] << endl;

	return 0;
}