#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef long double ld;
const ll MOD = 1e9 + 7/*998244353*/;
const ll INF = 1LL << 60;
ll mod_pow(ll, ll, ll); ll mod_fact(ll, ll); ll mod_inv(ll, ll); ll gcd(ll, ll); ll lcm(ll, ll);
//
int main(){
    ld a, b, c, d, e, f;
    while(cin >> a >> b >> c >> d >> e >> f){
        ld x, y;
        x = (c * e - b * f) / (a * e - b * d);
        y = (c * d - a * f) / (b * d - a * e);
      	if(abs(x) < 1e-10) x = 0;
        if(abs(y) < 1e-10) y = 0;
        cout << fixed << setprecision(3) << x << " " << y << "\n";
    }
}
