#include<stdio.h>
int main()
{
    int a,b,c,d,e,f;
    double x,y;
    while(scanf("%d%d%d%d%d%d", &a,&b,&c,&d,&e,&f)!=EOF){
        x=(double)(-(b*f)+(c*e))/(double)((a*e)-(b*d));
        y=(double)(-(c*d)+(a*f))/(double)((a*e)-(b*d));
        printf("%.3lf %.3lf\n", x,y);
    }
}