///BISMILLAHIR RAHMANIR RAHMIM
#include <bits/stdc++.h>
using namespace std;

int main ()
{
    ///freopen("input.txt","r",stdin);
    ///ios_base::sync_with_stdio(0);
    ///cin.tie(0);
    double a,b,c,d,e,f,x,y;
    while (scanf("%lf %lf %lf %lf %lf %lf",&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);
        if (x==0.000 && y!=0.000)
            printf("0.000 %.3lf\n",y);
        else if(x!=0.000 && y==0.000)
            printf("%.3lf %0.000\n",x);
        else
            printf("%.3lf %.3lf\n",x,y);
    return 0;
}
}