#include <iostream>
#include <algorithm>
#include <iomanip>
#include <cmath>

using namespace std;
int main(){
    float a,b,c,d,e,f;
    while((cin>>a>>b>>c>>d>>e>>f)){
        float x = (c*e-b*f)/(a*e-b*d);
        float y = (c*d-a*f)/(b*d-a*e);
        x = round(1000*x) / 1000;
        y = round(1000*y) / 1000;
        cout << fixed << setprecision(3) << x << " " << y << endl;
    }
    return 0;
}