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

int main(){
    float a, b, c, d, e, f, x, y, dividedNum1, dividedNum2 = 0;
    while(cin >> a >> b >> c >> d >> e >> f){
        dividedNum1 = a;
        dividedNum2 = d;
        a *= dividedNum2;
        b *= dividedNum2;
        c *= dividedNum2;
        d *= dividedNum1;
        e *= dividedNum1;
        f *= dividedNum1;
        
        float temp1 = b - e;
        float temp2 = c - f;
        
        y = floor((temp2 / temp1) * 1000 + 0.0005) / 1000;
        x = floor((c - (b * y) ) * 1000 + 0.0005) / 1000;
        
        cout << fixed << setprecision(3) << x << " " << fixed << setprecision(3) << y << endl;
    }
    return 0;
}