#include <iostream>
#include <iomanip>
using namespace std;
int main(void){
    double a, b, c, d, e, f;
    double y;
    while(cin>>a>>b>>c>>d>>e>>f){
        y = (c*d-a*f)/(b*d-a*e);
        cout<<fixed;
        cout<<setprecision(3)<<(c-b*y)/a<<" " <<y<<endl;
    }
    
    return 0;
}

