
#include<stdio.h>

int main (void){

    int num0[6];
    int num1[6];
    int i;
    double x0, y0;
    int x1, y1;

    for(i = 0;i < 6 ;i++){
        scanf("%d",&num0[i]);
    }

    for(i = 0; i < 3; i++){
        num1[i] = num0[i] * num0[3];
    }
    for(i = 3; i < 6; i++){
        num1[i] = num0[i] * num0[0];
    }

    y0 = (num1[2] - num1[5]) / (num1[1] - num1[4]);

    x0 = (num0[2] - num0[1] * y0) / num0[0];

    /*y1 = y0 * 1000;
    if(y1 % 10 >= 5){
        y1++;
        y0 = y1 / 1000;
    }

    x1 = x0 * 1000;
    if(x1 % 10 >= 5){
        x1++;
        x0 = x1 / 1000;
        printf("%f",x0);
    }*/

    printf("\t%.3f\n\t%.3f\n",x0 ,y0);


    return 0;
}