#include<iostream>
#include <cstdio>

using namespace std;

int main() {

	double no[12] = { 0 }, ans[4] = { 0 };
	int i, j = 0;

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

	for (i = 0; i < 3; i=i+2) {
		ans[i] = (no[j + 2] * no[j + 4] - no[j + 1] * no[j + 5]) / (no[j] * no[j + 4] - no[j + 1] * no[j + 3]);
		ans[i + 1] = (no[j + 3] * no[j + 2] - no[j] * no[j + 5]) / (no[j + 1] * no[j + 3] - no[j] * no[j + 4]);
			j = j + 6;
	}

	for (i = 0; i < 3; i = i + 2) {
		if (ans[i] == 0)
			ans[i] = 0;
		if (ans[i + 1] == 0)
			ans[i + 1] = 0;
		printf("%.3f %.3f\n", ans[i], ans[i + 1]);
	}

	return 0;
}