#include <iostream>
#include <stdio.h>
#include <math.h>
using namespace std;

int main()
{
	double a, b, c, d, p, q;
	double x, y;
	double det;
	
	while (cin >> a >> b >> p >> c >> d >> q) {
		det = a * d - b * c;
		x = (d * p - b * q) / det;
		y = (a * q - c * p) / det;
		printf("%.3f %.3f\n", x, y);
	}
	return 0;
}