#include <iostream>
#include <sstream>
#include <iomanip>
#include <algorithm>
#include <cmath>
#include <string>
#include <vector>
#include <list>
#include <queue>
#include <stack>
#include <set>
#include <map>
#include <bitset>
#include <numeric>
#include <climits>
#include <cfloat>
using namespace std;

int sign(int a){
    if(a >= 0)
        return 1;
    return -1;
}

int main()
{
    const int TMP = 10000;
    for(;;){
        int a,b,c,d,e,f;
        if(!(cin >> a >> b >> c >> d >> e >> f))
            return 0;
        int x = TMP * (c*e - b*f) / (a*e - b*d);
        int y = TMP * (c*d - a*f) / (b*d - a*e);
        if(abs(x) % 10 >= 5)
            x += 10 * sign(x);
        if(abs(y) % 10 >= 5)
            y += 10 * sign(y);
        x /= 10;
        y /= 10;
        printf("%d.%04d %d.%04d\n", x/TMP, abs(x)%TMP, y/TMP, abs(y)%TMP);
    }
}