#include<cstdio>
#include<sstream>
#include<cstdlib>
#include<cctype>
#include<cmath>
#include<algorithm>
#include<set>
#include<queue>
#include<stack>
#include<list>
#include<iostream>
#include<fstream>
#include<numeric>
#include<string>
#include<vector>
#include<cstring>
#include<map>
#include<iterator>

#define pi acos(-1)
#define mx 5000005

using namespace std;

int main () {
    double a,b,c,d,e,f;
    while(cin>>a>>b>>c>>d>>e>>f) {
        double l=(a*e)-(b*d);
        double x=((b*-f)-(e*-c))/l;
        double y=((-c*d)-(a*-f))/l;
        if (l==0.0) {
            x=0.0;
            y=0.0;
        }
        printf("%.3lf %.3lf\n",x,y);
    }
    return 0;
}