#include <iostream>
#include <iomanip>
#include <cmath>

using namespace std;

int main()
{
    int a, b, c, d, e, f;
    
    while (cin >> a >> b >> c >> d >> e >> f)
    {
        double x = (b * f - c * e) * 1.0 / (b * d - a * e);
        double y = (a * f - c * d) * 1.0 / (a * e - b * d);
        if (x == 0.0f)
            x = 0;
        if (y == 0.0f)
            y = 0;
        cout << setprecision (3) << fixed << x << " " << y << endl;
    }
    
    return 0;
}

