#include <iostream>
#include <cstdio>
using namespace std;
const double EPS = 1e-9;

int main() {
    double a, b, c, d, e, f;
    while (cin >> a >> b >> c >> d >> e >> f) {
        double x = (c * e - b * f) / (a * e - b * d);
        double y = (c - a * x) / b;
        printf("%.3f %.3f\n", x + EPS, y + EPS);
    }
}