#include <cstdio>
#include <algorithm>

using namespace std;


int main(){

    float a,b,c,d,e,f;
    while (scanf("%f%f%f%f%f%f",&a,&b,&c,&d,&e,&f)!=EOF){
        float x,y;
        if (a==0)
            swap(a,d),swap(b,e),swap(c,f);

        float ratio=d/a;

        e-=ratio*b;
        f-=ratio*c;

        y=f/e;
        x=(c-y*b)/a;

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


    return 0;
}
