#include <iostream>
#include <iomanip>

using namespace std;


int main(int argc, const char * argv[]) {
    // insert code here...
    
    int a,b,c,d,e,f;
    double x, y;
    
    cin >> a >> b >> c >> d >> e >> f;
    
    y = (f-c*(d/a)) / (e-b*(d/a));
    x = (c-b*y)/a;
    
    cout << setprecision(3) << x << endl;
    cout << setprecision(3) << y << endl;
    return 0;
}
