#include<cstdio>
#include<cmath>
#include<algorithm>
#define rep(i,a,b) for(int i = (a); i<=(b); i++)
using namespace std;
const int num = 100;
double matrix[num][num + 1];   //邉サ謨ー遏ゥ髦オ?御サ?蠑?ァ?double ans[num];               //扈捺棡謨ー扈?
void exchange_col(int p1,int p2,int n)  //莠、謐「p1陦悟柱p2陦檎噪謇?怏謨ー謐ョ
{
    double t;
    int i;
    for(i = 0 ; i <= n ; i++)
        t = matrix[p1][i],matrix[p1][i] = matrix[p2][i],matrix[p2][i] = t;
}

bool gauss(int n)   //豎りァ」邉サ謨ー遏ゥ髦オ荳コn逧?コソ諤ァ譁ケ遞狗サ?{
    int i,j,k;
    int p;
    double r;

    for(i = 0 ; i < n - 1 ; i++)
    {
        p = i;
        for(j = i + 1 ; j < n ; j++)     //蟇サ謇セi蛻玲怙螟ァ蛟シ菴咲スョ
        {
            if(matrix[j][i] > matrix[p][i])
                p = j;
        }
        if(matrix[p][i] == 0) return false;
        if(p != i)     exchange_col(i,p,n);
        for(j = i + 1 ; j < n ; j++)         //蜑ゥ菴吝?霑幄。梧カ亥?
        {
            r = matrix[j][i] / matrix[i][i];
            for(k = i ; k <= n ; k++)
                matrix[j][k] -= r * matrix[i][k];
        }
    }
    for(i = n - 1 ; i >= 0 ; i--)     //闔キ蠕礼サ捺棡
    {
        ans[i] = matrix[i][n];
        for(j = n - 1 ; j > i ; j--)
            ans[i] -= matrix[i][j] * ans[j];
        ans[i] /= matrix[i][i];
    }
    return true;
}
int main()
{
    int i,j,t;
    while(scanf("%lf",&matrix[0][0])!=-1)
    {
        rep(i,1,2) scanf("%lf",&matrix[0][i]);
        rep(i,0,2) scanf("%lf",&matrix[1][i]);
        gauss(2);
        printf("%.3lf %.3lf\n",ans[0],ans[1]);
    }
    return 0;
}