#include <stdio.h>
#include <algorithm>
#include <utility>
#include <functional>
#include <cstring>
#include <queue>
#include <stack>
#include <cmath>
#include <iterator>
#include <vector>
#include <string>
#include <set>
#include <iostream>
#include <random>
#include <map>
#include <iomanip>
#include <stdlib.h>
#include <list>
#include <typeinfo>
#include <list>
#include <set>
#include <cassert>
#include <fstream>
#include <unordered_map>
#include <cstdlib>
#include <complex>
#include <cctype>
#include <bitset>
using namespace std;

using ll = long long;
using vll = vector<ll>;
using pll = pair<ll, ll>;
using qll = queue<ll>;
using vb = vector<bool>;
using mll = map<ll, ll>;
using sll = stack<ll>;
using vec = vector<double>;
using mat = vector<vec>;
#define REP(i,n) for(ll i(0);(i)<(n);(i)++)
#define rep(i,n) for(ll i(0);(i)<(n);(i)++)
#define ALL(a) a.begin(), a.end()
#define elnd endl //* missspell check
const ll INF = 1LL << 60;
const double EPS = 1E-8;
//* Solve Ax = b. A is a square matrix in O(n^3)
//* Return 0-length vector if unsolvable/not-unique
//* partial pivoting
vec GaussJordan(const mat &A, const vec &b){
    ll n = A.size();
    mat B(n, vec(n+1)); //* last columb for solution
    //* initialize B
    REP(i, n) REP(j, n) B[i][j] = A[i][j];
    REP(i, n) B[i][n] = b[i];

    REP(i, n){
        ll pivot = i;
        for(ll j = i; j < n; j++){
            if(abs(B[j][i]) > abs(B[pivot][i])) pivot = j;
        }
        swap(B[i], B[pivot]); //* swap i-th row and pivot-th row
        if(abs(B[i][i]) < EPS) return vec();

        for(ll j = i+1; j <=n; j++) B[i][j] /= B[i][i];
        //* eliminition
        for(ll j = 0; j < n; j++){
            if(i != j){
                for(ll k = i+1; k <= n; k++) B[j][k] -= B[j][i] * B[i][k];
            }
        }
    }
    //* prepare solution
    vec x(n);
    for(ll i=0; i < n; i++) x[i] = B[i][n];
    return x;
}

//! http://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=0004&lang=ja
int main(){
    mat A(2, vec(2));
    vec b(2);
    while(scanf("%lf %lf %lf %lf %lf %lf",&A[0][0],&A[0][1],&b[0],&A[1][0],&A[1][1],&b[1])!=EOF){
        vec x = GaussJordan(A, b);
        printf("%.3lf %.3lf\n",x[0],x[1]);
    }
    return 0;
}
