#include <iostream>
#include <cmath>

int main()
{
    using namespace std;
    double a, b, c, d, e, f, x, y;
    cout.precision(3);
    cout << fixed << showpoint;
    while (cin >> a >> b >> c >> d >> e >> f) {
        double coef1 = d/a;
        b *= coef1; c *= coef1;
        y = (c - f)/(b - e);
        x = (c - b*y)/a;
        x = round(x*1000)/1000; y = round(y*1000)/1000;
        cout << x << " " << y << endl;
    }
}