#include<iostream>
#include<stdio.h>
using namespace std;
int main(){
    float a,x,b,y,c,f,e,d,y2,x2;
    while(cin>>a>>b>>c>>d>>e>>f){
        y2=b*e*y;
        x2=a*d;
       //(a*e)*x+y2=c*e  (d*b)*x+y2=f*b    (a*e)*x=c*e
                   //(a*e-d*b)*x=(c*e-f*b-y2*2)
        x=(c*e-f*b-y2*2)/(a*e-d*b);
        //a*x+b*y=c
        y=(c-(a*x))/b;
        
        printf("%.3f %.3f",x,y);cout<<endl;
            //y=(c*d)/(b*d);
        
    }
    
    return 0;
}