#include "iostream"
#include "cstdio"
using namespace std;

int main(void)
{
    double a, b, c, d, e, f;
    int num;

    while(cin >> a >> b >> c >> d >> e >> f) {
        double num1 = a,num2 = d, x, y;
        a *= num2; b *= num2; c *= num2;
        d *= num1; e *= num1; f *= num1;

        num1 = b - e; num2 = c - f;
        y = num2 / num1; x = (c - b*y) / a;

        x *= 10000; y *= 10000;
        num = (int)x; x = (double)num;
        num = (int)y; y = (double)num;
        num1 = (int)x % 10; num2 = (int)y % 10;

        x /= 10000; y /= 10000;

        if (num1 > 4) {
            x += 0.001;
        }
        if (num2 > 4) {
            y += 0.001;
        }

        printf("%0.3f %0.3f\n", x, y);

    }
    
    return 0;
}