#include<stdio.h>
int main()
{
    double x,y,a,b,c,d,e,f,m,n,p;
    while(scanf("%lf %lf %lf %lf %lf %lf",&a,&b,&c,&d,&e,&f)!=EOF)
    {
        m=(b*(-f))-((-c)*e);
        n=(a*e)-(b*d);
        p=((-c)*d)-(a*(-f));
        x=m/n;
        y=p/n;
        printf("%0.3lf %0.3lf\n",x,y);

    }
    return 0;
}