#include <iostream>
#include <sstream>
using namespace std;

int main() {
    string line;
    while (getline(cin, line)) {
        int a, b, c, d, e, f;
        stringstream ss(line);
        ss >> a >> b >> c >> d >> e >> f;

        double x, y;
        if (b*d != a*e) {
            y = static_cast<double>(c*d - a*f) / (b*d - a*e);
            x = static_cast<double>(c - b*y) / a;
        } else {
            x = static_cast<double>(c*e - b*f) / (a*e - b*d);
            y = static_cast<double>(c - a*x) / b;
        }
        cout.precision(4);
        cout << showpoint << x << " " << y << endl;
    }
}