#include<iostream>
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 - f*b / e) / (a - d*b/e);
    y = (c - f*a / d) / (b - e*a/d);

    cout << x << " " << y << endl;
   }

  return 0;
}