#include <bits/stdc++.h>
using namespace std;

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