#include <iostream>
#include <cmath>

using namespace std;

double A[2][2];
double B[2];
double Ainv[2][2];

int main()
{
	while(scanf("%lf %lf %lf %lf %lf %lf", &A[0][0], &A[0][1], &B[0],
				&A[1][0], &A[1][1], &B[1]) != EOF)
	{
		double det = A[0][0] * A[1][1] - A[1][0] * A[0][1];
		if(det == 0.0)
		{
			cout << "this equation has no answer." << endl;
			return -1;
		}

		Ainv[0][0] = A[1][1] / det;
		Ainv[0][1] = -A[0][1] / det;
		Ainv[1][0] = -A[1][0] / det;
		Ainv[1][1] = A[0][0] / det;
		
		double ans_x = Ainv[0][0] * B[0] + Ainv[0][1] * B[1];
		double ans_y = Ainv[1][0] * B[0] + Ainv[1][1] * B[1];

		printf("%.3f %.3f\n", ans_x, ans_y);
	}
}