#include <iostream>
#include <cmath>
#include <iomanip>

using namespace std;

double format(double value) {
    return ((int)(value*1000.0+0.5)) / 1000.0;
}

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

    while (cin >> a >> b >> c >> d >> e >> f) {
        bufferY = ((double)(c*d-a*f))/((double)(b*d-a*e));
        bufferX = ((double)(c-b*bufferY))/((double)a);

        cout << fixed << setprecision(3) << bufferX << " " << bufferY << endl;
    }

    return 0;
}
