#include <cstdio>
#include <cfloat>
#include <cmath>
#include <iostream>

int main()
{
    double a, b, c, d, e, f;
    while (std::cin >> a >> b >> c >> d >> e >> f) {
        double x = (c * e - b * f) / (a * e - b * d);
        double y = (c * d - a * f) / (b * d - a * e);
        if (fabs(x) < DBL_EPSILON) {
            x = 0.0;
        }
        if (fabs(y) < DBL_EPSILON) {
            y = 0.0;
        }
        printf("%.3f %.3f\n", x, y);
    }

    return 0;
}

