#include <iostream>
#include <iomanip>
using namespace std;
int main(){
    double a,b,c,d,e,f;

    while (!cin.eof()){
        cin>>a>>b>>c>>d>>e>>f;
        double D=a*e-b*d;
        double X=(c*e-f*b)/D,Y=(a*f-d*c)/D;
        cout << setprecision(3)<<fixed;
        cout<<setprecision(3)<<X<<" "<<Y<<endl;

    }
    return 0;
}