#include <stdio.h>
int main ()
{
    long long int a,b,c,d,e,f;
    double x,y;
    while(scanf("%lld %lld %lld %lld %lld %lld",&a,&b,&c,&d,&e,&f)!=EOF)
    {
            x=(c*e-b*f)/(a*e-b*d);
            y=(a*f-c*d)/(a*e-b*d);

            printf("%.3lf %.3lf\n",x,y);
    }
    return 0;
}