#include <iostream>
#include <iomanip>
using namespace std;

int main(){
    
    double a,b,c,d,e,f,x,y;
    
    while(cin>>a>>b>>c>>d>>e>>f){
        
        y=((d/a)*c-f)/((d/a)*b-e);
        x=((e/b)*c-f)/((e/b)*a-d);
        
        cout<<fixed<<setprecision(3)<<x<<" "<<y<<endl;
    }
}