
#include<stdio.h>

int main (void){

    int a,b,c,d,e,f;

    double X,Y;

    while(scanf("%d%d%d%d%d%d",&a,&b,&c,&d,&e,&f) != EOF){

        Y = (c*d-f*a)/(b*d-e*a);

        X = (c*e-f*b)/(a*e-d*b);

        printf("%.3lf %.3lf\n",X ,Y);
    }

    return 0;
}