#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef vector<int> vi;
typedef vector<string> vs;
typedef vector<bool> vb;
typedef vector<char> vc;
typedef vector<ll> vll;
typedef vector<vector<int>> vvi;
typedef vector<vector<string>> vvs;
typedef vector<vector<char>> vvc;
typedef vector<vector<bool>> vvb;
typedef pair<int,int> P;
#define vrep(v,n) for(int i=0;i<n;i++){cin >> v.at(i);} //配列vにn個の要素を入力する
#define rep(i, l, n) for (int i = l; i < (int)(n); i++)
#define repn(i, l, n) for (int i = l; i <= (int)(n); i++)
#define pb push_back 

const int mod = 1000000007;
const int inf = 1e9;

float round_n(float number, double n)
{
    number = number * pow(10,n-1); 
    number = round(number); 
    number /= pow(10, n-1); 
    if(number == -0) number += 0;
    return number;
}

int main(){
    while(1){
        float a = inf,b,c,d,e,f;
        cin >> a >> b >> c >> d >> e >> f;
        if(a == inf){break;}
        float x = (c*e-b*f)/(a*e-d*b);
        float y = (c*d-a*f)/(b*d-a*e);
        cout << fixed<<setprecision(3) << round_n(x, 4) << " " << fixed<<setprecision(3) << round_n(y,4) << endl;
    }
}
