#include<iostream>
#include<cstdio>
using namespace std;
int main()
{
   double a,b,c,d,e,f;
   double x,y;
   while(cin >> a >> b >> c >> d >> e >> f)
   {
        x=(c*e-f*b)/(a*e-d*b);
        y=(c*d-f*a)/(b*d-e*a);
        if(x>-0.001 && x<0.001)x=0;
        if(y>-0.001 && y<0.001)y=0;
      printf("%1.3f %1.3f\n" ,x,y);
   }
    return 0;
}