#include<stdio.h>
#include<math.h>
void solution(int a,int b,int c,int d,int e,int f);
double x,y;
int main()
{
    int a,b,c,d,e,f;
    while(scanf("%d %d %d %d %d %d",&a,&b,&c,&d,&e,&f)==6)
    {
        solution(a,b,c,d,e,f);
        printf("%0.3lf %0.3lf\n",x,y);
    }
    return(0);
}
void solution(int a,int b,int c,int d,int e,int f)
{
    double number_1,number_2,number_3,correction;
    number_1=c*e-b*f;
    number_2=a*f-c*d;
    number_3=a*e-b*d;
    if((number_1==0)&&(number_3<0)&&(number_2!=0))
    {
        correction=-1*number_3;
        x=number_1/correction;
        y=number_2/number_3;
    }
    else if((number_2==0)&&(number_3<0)&&(number_1!=0))
    {
        correction=-1*number_3;
        x=number_1/number_3;
        y=number_2/correction;
    }
    else if((number_1==0)&&(number_3<0)&&(number_2==0))
    {
        correction=-1*number_3;
        x=number_1/correction;
        y=number_2/correction;
    }
    else
    {
        x=number_1/number_3;
        y=number_2/number_3;
    }
    return;
}