#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 = 0.0;
        if (c*e != b*f)
            x = static_cast<double>(c*e - b*f) / (a*e - b*d);
        double y = static_cast<double>(c - a*x) / b;
        cout.precision(4);
        cout << showpoint << x << " " << y << endl;
    }
}