#include <iostream>
#include <cstdio>
using namespace std;
 
int main() {
    double a, b, c, d, e, f;
    while (cin >> a >> b >> c >> d >> e >> f) {
        double y = (c*d - a * f) / (b*d - a * e);
        double x = c / a - b * y / a;
        x *= 1000;
        x = (int)(x + 0.5 - (x < 0));
        x /= 1000;
        y *= 1000;
        y = (int)(y + 0.5 - (y < 0));
        y /= 1000;
        printf("%.3f %.3f\n", x, y);
    }
}
