#include <stdio.h>
#define EPS 1e-10
int main() {
    int a,b,c,d,e,f,x,sign,sign2;double q,r;while (scanf("%d %d %d %d %d %d",&a,&b,&c,&d,&e,&f)!=EOF) {
        x=a*e-b*d;if (x<0) sign=-1,x=-x; else sign=1;
        q=(c*e-f*b);if (q<0.00) sign2=-1,q=-q; else sign2=1;q=(q*sign*sign2)/(x+0.00);
        r=(a*f-c*d);if (r<0.00) sign2=-1,r=-r; else sign2=1;r=(r*sign*sign2)/(x+0.00);
        if (r<EPS && r>-EPS) r=0.00;if (q<EPS && q>-EPS) q=0.00;
        printf("%.3lf %.3lf\n",q,r);
    }
return 0;}