#include <iostream>
#include <vector>
#include <map>
#include <set>
#include <algorithm>
#include <numeric>
#include <cmath>
using namespace std;
typedef vector<int> VI;
#define REP( i, m, n ) for ( int i = (int)( m ); i < (int)( n ); ++i )

int main() {
    ios::sync_with_stdio(false);
    cin.tie(0);
    
    vector<vector<double>> equations;

    double a, b, c, d, e, f;
    while (cin >> a >> b >> c >> d >> e >> f) {
        vector<double> tmp = {a, b, c, d, e, f};
        equations.push_back(tmp);
    }

    for (auto t : equations) {
        double x, y;
        t[4] = t[4] / t[3] * t[0] - t[1];
        t[5] = t[5] / t[3] * t[0] - t[2];
        t[1] /= t[0];
        t[2] /= t[0];

        y = t[5] / t[4];
        x = t[2] - t[1] * y;
        
        cout.setf(ios::fixed);
        cout.precision(3);
        cout << x << " " << y << endl;
    }
    
    return 0;
}