#include <iostream>
#include <iomanip>
#include <cmath>

int main()
{
    while (true) {
        int a, b, c, d, e, f;
        std::cin >> a >> b >> c >> d >> e >> f;
        if (std::cin.eof()) break;
        double denom = a * e - b * d;
        double x = (c * e - b * f) / denom, y = (a * f - c * d) / denom;
        std::cout << std::fixed << std::setprecision(3) << floor(1000.0 * x + 0.5) / 1000.0
            << " " << floor(1000.0 * y + 0.5) / 1000.0 << std::endl;
    }
}