#include<cstdio>
#include<iostream>
using namespace std;
int main(){
        double a1,a2,b1,b2,c1,c2,x,y;
        while(scanf("%lf%lf%lf%lf%lf%lf",&a1,&b1,&c1,&a2,&b2,&c2)!=EOF){
                x=(b2*c1-c2*b1)/(a1*b2-a2*b1);
                y=(a1*c2-a2*c1)/(a1*b2-a2*b1);
                if(x==-0)x=0;
                if(y==-0)y=0;
                printf("%.3lf %.3lf\n",x,y);
        }
        return 0;
}