#include <iostream>
#include <cstdio>
int main()
{
    double a,b,c,d,e,f,y,x;
    while(std::cin >> a >> b >> c >> d >> e >> f) 
    {
        if(a!=0)
            y = (double)( (c / a) - (f / d) ) / ( (b / a) - (e /d ));
        else
            y = (double)(c / b); 
        if(b!=0)
            x = (double)( c / a ) - ( b / a ) * y;
        else
            x = (double)(f / d);
        if(x==0)x=0;
        if(y==0)y=0;
        printf("%.3lf %.3lf",x,y);
    }  
    return 0;
}