#include <iostream>
#include <cstdio>
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 ya = d * c - a * f;
        double yb = b * d - a * e;
        double y = ((yb == 0) ? 0.0 : ((ya) / (yb)));
        
        double x = (a == 0) ? 0 : ((c - b * y) / a);
        printf("%.3f %.3f",x, y);
        
    }
    
    return(0);
}