#include<stdio.h>
int main(){
    double a,b,c,d,e,f;
    double db,dc,ae,af;
    double ny,n;
    double y;
    double x;
    while(scanf("%lf%lf%lf%lf%lf%lf",&a,&b,&c,&d,&e,&f)!=EOF){
        db=d*b;
        dc=d*c;
        ae=a*e;
        af=a*f;
        ny=db-ae;
        n=dc-af;
        y=n/ny;
        x=(c-y*b)/a;
        printf("%lf %lf\n",x,y);
    }
    return 0;
}