#include <iostream>

int main(void) {
    int a, b, c, d, e, f;

    while (std::cin >> a >> b >> c >> d >> e >> f) {
        auto x = (c*e - b*f)/(a*e - b*d);
        auto y = (c*d - a*f)/(b*d - a*e);
        printf ("%.3f %.3f\n",
                x == -0. ? 0.0 : x,
                y == -0. ? 0.0 : y);
    }

    return 0;
}