#include <iostream>
#include <iomanip>
#include<cmath>

using namespace std;

void Round(double &refX)
{
    const double eps = 0.001;
    if( abs(refX) < eps)
        refX = 0;
}
  
int main()
{
    int a,b,c,d,e,f;
    double x,y;
    while(cin>>a>>b>>c>>d>>e>>f)
    {
                 
            if (a*e == b*d)
            {
                   //cout<<'No Answer'<<endl; 
                   continue;
             }
             x= (c*e-b*f)/(a*e-b*d);
             y= (c*d-a*f)/(b*d-a*e);
  

             Round(x);
             Round(y);

             cout<<setprecision(3)<<fixed;
             cout<<x<<" "<<y<<endl;
    }
    return 0;
}