#include<iostream>
#include<iomanip>
#include<cstdio>
#define eps 1e-9
using namespace std;

int main(){
    double a,b,c,d,e,f;
    double x,y;

    while(cin>>a>>b>>c>>d>>e>>f){
        x = ((e*c)-(b*f))/((a*e) - (b*d)) ;
        y = ((a*f) - (c*d))/((a*e) - (b*d)) ;

        printf("%.3lf %.3lf\n",x+eps,y+eps);
    }
    return 0;
}