#include <iostream>
#include <iomanip>

using namespace std;

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

    while (cin >> a >> b >> c >> d >> e >> f) {
        det = a * e - b * d;
        det = 1.0 / det;
        x = det * (e * c - b * f);
        y = det * (a * f - c * d);

        if (x == 0)
            x = 0;
        if (y == 0)
            y = 0;
        cout << setprecision(3);
        cout << fixed;
        cout << x << ' ' << y << endl;
    }

    return 0;
}