#include <iostream>
#include <string>
#include <algorithm>
#define REP(i, n) for(i = 0; i < n; i++)
const int n = 2;
int main()
{
    double a, b, c, d, e, f;
    int i, j;
    while(std::cin >> a >> b >> c >> d >> e >> f)
    {
        double A[n][n + 1] {
            {a, b, c},
            {d, e, f}
        };
        REP(i, 3) A[0][i] /= a;
        REP(i, 3) A[1][i] -= d * A[0][i];
        double d1 = A[1][1];
        REP(i, 3) A[1][i] /= d1;
        REP(i, 2) REP(j, 3)
        {
            int roundtmp = 1000;
            A[i][j] *= roundtmp;
            A[i][j] = int(A[i][j] + 0.5 - (A[i][j] < 0));
            A[i][j] /= roundtmp;
        }
        std::cout.precision(4);
        std::cout << std::showpoint << A[0][2] - A[0][1] * A[1][2] << " " << A[1][2] << std::endl;
    }
}