#include <cstdio>

using namespace std;

int main()
{
    double a,b,c,d,e,f;

    while(scanf("%lf%lf%lf%lf%lf%lf",&a,&b,&c,&d,&e,&f)!=EOF){
        double x=(c-b*f/e)/(a-b*d/e);
        double y=(c-a*x)/b;
        printf("%.3lf %.3lf\n",x,y);
    }

    return 0;
}