#include <iostream>
#include <cstdio>
using namespace std;

const double ep = 1e-10;

int main() {
    int a, b, c, d, e, f, A, B, C;
    double x, y;
    while(cin >> a >> b >> c >> d >> e >> f) {
        A = c*e - b*f;
        B = a*f - c*d;
        C = a*e - b*d;
        x = (double)A/C; y = (double)B/C;
        if(x>-ep && x<ep) x = 0.0;
        if(y>-ep && y<ep) y = 0.0;
        printf("%.3f %.3f\n", x, y);
    }
}
