#include <iostream>
#include <stdio.h>
using namespace std;
 
int main(){
    double a,b,c,d,e,f,delta,kai,kait;
    while(1){
    if( scanf("%d %d %d %d %d %d",&a,&b,&c,&d,&e,&f) == EOF) break;
    delta=a*d-b*c;
    kai=(d*e-b*f)/delta;
    kait=(a*f-e*c)/delta;
    printf("%.3f %.3f\n",kai,kait);
    }
 
    return 0;
}