#include <bits/stdc++.h>
#define int long long
#define ll long long
#define rep(i,n) for(int i=0;i<n;i++)
#define INF (((ll)1<<31)-1)
#define eps LDBL_EPSILON
#define moder (1000000007)
#define pie 3.141592653589793238462643383279
#define P std::pair<int,int>
#define prique priority_queue
#define ggr getchar();getchar();return 0;
using namespace std;
double a,b,c,d,e,f;
signed main(){
    while(cin>>a>>b>>c>>d>>e>>f){
        double ans1=(c*e-b*f)/(a*e-b*d),ans2=(c*d-a*f)/(b*d-a*e);
        if(c*e==b*f)ans1=0;
        if(c*d==a*f)ans2=0;
        if((int)(ans1*10000)%10>=5)ans1=(int)(ans1*1000)+1;
        else ans1=(int)(ans1*1000);
        if((int)(ans2*10000)%10>=5)ans2=(int)(ans2*1000)+1;
        else ans2=(int)(ans2*1000);
        printf("%.3lf %.3lf\n",ans1/1000,ans2/1000);
    }
    ggr;
}
