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

void f1(float a,float b,float c,float d,float e,float f)
{
    float x,y;
    y=(c*d-a*f)*1.0/(b*d-a*e);
    x=(c-b*y)*1.0/a;
    cout<<fixed<<setprecision(3)<<x<<" "<<y<<endl;
}

int main()
{
    float a,b,c,d,e,f;
    while(cin>>a>>b>>c>>d>>e>>f){
        f1(a,b,c,d,e,f);
    }
    return 0;
}

