#include <iostream>
#include <cstdio>
#define EPS 1e-10
using namespace std;

int main(void) {
    
    double a, b, c, d, e, f;
    
    while(scanf("%lf %lf %lf %lf %lf %lf", &a, &b, &c, &d, &e, &f) != EOF) {
        double y = ((c*d - a*f) / (b*d - a*e));
        if(b*d-a*e == 0) y += EPS;
        double x = (c - b*y) / a;
        if(a == 0) y += EPS;
    
        printf("%.3f %.3f\n", x, y);
    }
    return(0);
}