#include <iostream>
#include <stdio.h>
#include <math.h>
using namespace std;

double round(double src,int n);

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

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

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

double round(double src,int n){
    double p = src * pow(10,n-1);
    p = floor(p+0.5);
    p = p * pow(10,-(n-1));
    return p;
    
}