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

int main() {

  int a,b,c,d,e,f;

  while( cin >> a >> b >> c >> d >> e >> f ) {

    double x = 1.00;
    if ( ( c*e - f*b ) * ( a*e - d*b ) != 0 ) {
      x = x * ( c*e - f*b ) / ( a*e - d*b );
    }else {
      x = 0.00;
    }
    double y = 1.00;
    if ( ( c*d - f*a ) * ( b*d - e*a ) != 0 ) {
      y = y * ( c*d - f*a ) / ( b*d - e*a );
    }else {
      y = 0.00;
    }

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

  }

  return 0;

}