#include <stdio.h>
#include <stdlib.h>
#include <math.h>

int main() {
    int a, b, c, d, e, f;
    double x, y;
    while (scanf(" %d %d %d %d %d %d", &a, &b, &c, &d, &e, &f) != EOF) {
        x = 1.0 * (c * e - b * f) / (a * e - b * d);
        y = 1.0 * (a * f - c * d) / (a * e - b * d);
        x = floor(x * 1000) / 1000;
        if (x == 0) x = 0;
        y = floor(y * 1000) / 1000;
        if (y == 0) y = 0;
        printf("%.3f %.3f\n", x, y);
    }
}