#include <bits/stdc++.h>
using namespace std;
typedef long long ll;

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