#include<cstdio>
using namespace std;

int main() {
        int a, b, c, d, e, f;
        double x, y;
        char line[200];

        while(fgets(line, 200, stdin) != NULL) {
                sscanf(line, "%d%d%d%d%d%d", &a, &b, &c, &d, &e, &f);
                x = ((double)e*c - b*f) / (a*e - d*b);
                y = ((double)a*f - d*c) / (a*e - d*b);
                printf("%.3f %.3f\n", x, y);
        }
}