#include <iostream>
#include <cstdio>
#include <iomanip>

using namespace std;

int main() {
	double a, b, c, d, e, f;
	double x, y;

	cin >> a >> b >> c >> d >> e >> f;

	y = ((((a * d) / a) * c) - (((a * d) / d) * f)) / ((((a * d) / a) * b) - (((a * d) / d) * e));
	x = (c - (b * y)) / a;

	cout << fixed << setprecision(3) << x << " " << y << endl;
}