#include<iostream>
#include<iomanip>
#include<cstdio>
#include<vector>
#include<algorithm>
#include<cmath>
#include<queue>
#include<stack>
#include<functional>
#include<string>
#include<cstring>
#include <sstream>
using namespace std;
int main(void){
    double a,b,c,d,e,f,x,y;
    while(cin >> a >> b >> c >> d >> e >> f){
        double ad = a / d;
        d *= ad;
        e *= ad;
        f *= ad;
        d -= a;
        e -= b;
        f -= c;
        y = f/e;
        x = (c - b * y)/a;
        y *= 1000;
        y = round(y);
        y /= 1000;
        x *= 1000;
        x = round(x);
        x /= 1000;
        cout << fixed << setprecision(3) << x << " " << y << endl;
    }
    return 0;
}