#include <iostream>
#include <cstdio>
#include <cmath>
using namespace std;

int main(void) {
    double a,b,c,d,e,f;
    double x,y;
    while (1){
        cin >> a;
        if (cin.eof())
            break;
        cin >> b >> c >> d >> e >> f;
        x=(e*c-b*f)/(a*e-b*d);
        y=(-d*c+a*f)/(a*e-b*d);
        printf("%.3f %.3f\n",x,y);
    }
    return 0;
}