#include <iostream>
#include <cstdio>

using namespace std;

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


    while (cin >> a >> b >> c >> d >> e >> f) {
        double div = 1 / (a*e - b*d);
        //cout << (e*c - b*f) * div << " " << (-d*c + a*f) * div << endl;
        printf("%.3f %.3f\n", (e*c - b*f) * div, (a*f - d*c) * div);
    }

    return 0;
}