#include <cmath>
#include <iomanip>
#include <ios>
#include <iostream>
#include <sstream>
#include <string>

using namespace std;

int main()
{
    string s;
    while (getline(cin, s)) {
        stringstream ss;
        ss << s;
        int a, b, c, d, e, f;
        ss >> a >> b >> c >> d >> e >> f;

        auto det = [](int a00, int a01, int a10, int a11) -> double {
            return a00 * a11 - a01 * a10;
        };

        auto x1 = det(c, b, f, e) / det(a, b, d, e);
        auto x2 = det(a, c, d, f) / det(a, b, d, e);
        if (x1 == 0) {
            x1 = 0;
        }
        if (x2 == 0) {
            x2 = 0;
        }
        cout << setprecision(4) << fixed << x1 << ' ' << x2 << endl;
    }
}