#include <iostream>
#include <iomanip>

using namespace std;

int main() {
    double a, b, c, d, e, f;
    while(true) {
        cin >> a;
        if(cin.eof()) break;
        cin >> b >> c >> d >> e >> f;
        double det = a * e - b * d;
        if(det == 0.0) break;
        cout << fixed << setprecision(3);
        cout << ((e*c/det-b*f/det)) << " " << ((-d*c/det+a*f/det)) << endl;
    }

    return 0;
}
