#include <stdio.h>
int main(void){
    float a,b,c,d,s,t;
    while(~scanf("%f%f%f%f%f%f",&a,&b,&s,&c,&d,&t)){
        printf("%.3f %.3f\n",(s*d-b*t)/(a*d-b*c),(a*t-s*c)/(a*d-b*c));
    }
    return 0;
}