#include <iostream>
#include <cstdio>
#include <cmath>
using namespace std;

int main()
{
    double a,b,c,d,e,f,x,y;
    while(cin>>a>>b>>c>>d>>e>>f)
    {
        x=(c*e-b*f)/(a*e-b*d);
        y=(f-d*x)/e;
        x*=1000;
        if(x>0)x+=0.5;else x-=0.5;
        x=(int)x;
        x/=1000;
        y*=1000;
        if(y>0)y+=0.5;else y-=0.5;
        y=(int)y;
        y/=1000;
        if(abs(x)<1e-5)x=0;
        if(abs(y)<1e-5)y=0;
        printf("%.3lf %.3lf\n",x,y);
    }
    return 0;
}