#include <iostream>
#include <bitset>
#include <fstream>
#include <string>
#include <cstring>
#include <cmath>
#include <cstdlib>
#include <ctime>
#include <vector>
#include <algorithm>
#include <numeric>
#include <map>
#include <set>
#include <stack>
#include <queue>
#include <deque>
#include <functional>
#include <cctype>
#include <list>
#include <limits>
#include <unordered_map>
#define Debug 0
//#include <boost/multiprecision/cpp_int.hpp>

const double EPS = (1e-10);


using namespace std;
using Int = long long;
//using namespace boost::multiprecision;

const Int MOD = 1000000007;

Int mod_pow(Int x, Int n) {
    Int res = 1;
    while(n > 0) {
        if(n & 1) res = (res * x) % MOD; //ビット演算(最下位ビットが1のとき)
        x = (x * x) % MOD;
        n >>= 1; //右シフト(n = n >> 1)
    }
    return res;
}

//最大公約数
template<typename T>
T gcd(T a, T b) {
    return b != 0 ? gcd(b, a % b) : a;
}

//最小公倍数
template<typename T>
T lcm(T a, T b) {
    return a * b / gcd(a, b);
}

vector<pair<double, double>> vans;
void solve(double *a, double *b) {
    double a2[3];
    double b2[3];
    a2[0] = a[0] * b[1];
    a2[2] = a[2] * b[1];
    b2[0] = b[0] * a[1];
    b2[2] = b[2] * a[1];
    double ans[2];
    if (a[1] && b[1]) {
        ans[0] = (a2[2]-b2[2])/(a2[0]-b2[0]); 
        ans[1] = ((a[2] - ans[0]*a[0]) / a[1]);
    } else {
        if (!a[1]) {
            ans[0] = a[2] / a[0];
            ans[1] = (b[2] - ans[0]*b[0]) / b[1];
        } else {
            ans[0] = b[2] / b[0];
            ans[1] = (a[2] - ans[0]*a[0]) / a[1];
        }
    }
    if (ans[0] == -0) ans[0] = 0;
    if (ans[1] == -0) ans[1] = 0;
    vans.push_back({ans[0], ans[1]});
}

int main(){
    double a[3], b[3];
    while (cin >> a[0]) {
        cin >> a[1];
        cin >> a[2];
        cin >> b[0];
        cin >> b[1];
        cin >> b[2];
        solve(a, b);
    }
    for (auto i: vans) {
        printf("%.3f %.3f\n", i.first, i.second);
    }
}



