#include<stdio.h>
#define N 1000000
struct{double a,b,c,d,e,f;}data[N];

int main(){
    int i,L;
    double a,b,c,d,e,f;
    double x,y;
    for(i=0; i<N&&scanf("%d %d %d %d %d %d",data[i].a,data[i].b,data[i].c,data[i].d,data[i].e,data[i].f)!=EOF; i++);
    L=i;
    for(i=0;i<L;i++){
        a=data[i].a; b=data[i].b; c=data[i].c; d=data[i].d; e=data[i].e; f=data[i].f;
        x=(1/(a*e-b*d))*(e*c-b*f);
        y=(1/(a*e-b*d))*(a*f-d*c);
        printf("%.3f %.3f",x,y);
    }
    return 0;
}