#include<cstdio>
#include<cstdlib>
#include<cmath>
#include<climits>
#include<iostream>
#include<algorithm>
#include<stack>
#include<queue>
#include<vector>
#include<list>
#include<map>
#include<set>
typedef long long ll;
typedef unsigned long long ull;
using namespace std;
#define pb push_back
int dy[]={0, 0, 1, -1, 0};
int dx[]={1, -1, 0, 0, 0};
 
#define FOR(i,a,b) for (int i=(a);i<(b);i++)
#define RFOR(i,a,b) for (int i=(b)-1;i>=(a);i--)
#define REP(i,n) for (int i=0;i<(n);i++)
#define RREP(i,n) for (int i=(n)-1;i>=0;i--)

int main(){
    while(1){
        double a,b,c,d,e,f;
        int ret = scanf("%lf%lf%lf%lf%lf%lf",&a,&b,&c,&d,&e,&f);
        if(ret == EOF)
            break;

        double x = (c * e - f * b) / (a * e - d * b);
        double y = (c * d - f * a) / (b * d - e * a);

        printf("%1.3lf %1.3lf\n",x,y);
    }
    return 0;
}