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

double ans(double a,double b,double c,double d,double e,double f){
    double y1=b*d;
    double a1=c*d;
    double y2=e*a;
    double a2=f*a;
    double y=y1-y2;
    double a3=a1-a2;
    return a3/y;
}

int main(){
    double a,b,c;
    double d,e,f;
    cin>>a>>b>>c;
    cin>>d>>e>>f;

    cout<<fixed<<setprecision(3)<<ans(b,a,c,e,d,f)<<' '<<setprecision(4)<<ans(a,b,c,d,e,f)<<endl;
}
