#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 de = (a*e) - (b*d);
        double x = 0;
        double y = 0;
        x = e*c + (-b)*f;
        x /= de;
        y = a*f + (-d)*c;
        y /= de;
        if(x == 0)
            x = 0.000;
        if(y == 0)
            y = 0.000;

        printf("%.3f %.3f\n",x,y);
    }
    return 0;
}