#include <bits/stdc++.h>
using namespace std;

#define rep(i, n) REP(i, 0, n)
#define ALL(v) v.begin(), v.end()
#define MSG(a) cout << #a << " " << a << endl;
#define REP(i, x, n) for (int i = x; i < n; i++)
#define OP(m) cout << m << endl;
typedef long long ll;
typedef unsigned long long ull;

int main()
{
    double a, b, c, d, e, f;
    while (cin >> a >> b >> c >> d >> e >> f)
    {
        double det = a * e - b * d;

        double x = (1 / det) * (e * c - b * f), y = (1 / det) * (-d * c + a * f);
        if (x == 0)
            x = 0;
        if (y == 0)
            y = 0;
        printf("%.3f %.3f\n", x, y);
    }

    return 0;
}
