#include <cstdio>
#include <iostream>
#include <algorithm>

using namespace std;

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

    while (cin >> a >> b >> c >> d >> e >> f)
    {
        y = (f - c / a * d) / (e - b / a * d);
        x = c / a - b / a * y;
        printf("%.03f\n", x);
        printf("%.03f\n", y);
    }

    return 0;
}
