#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int t1, t2, t0, x1, x2;
  cin >> t1 >> t2 >> x1 >> x2 >> t0;
  if (t1 == t0 && t2 == t0) {
    cout << x1 << " " << x2 << endl;
  } else if (t1 == t0) {
    cout << x1 << " " << 0 << endl;
  } else if (t2 == t0) {
    cout << 0 << " " << x2 << endl;
  } else {
    long long int g, A = t2 - t0, B = 1, C = 0, D = 0;
    long long int Y1 = 0, Y2 = x2, mx = x2;
    for (long long int y1 = 1; y1 <= x1; y1++) {
      long long int y2 = (t0 * y1 - t1 * y1 + t2 - t0 - 1) / (t2 - t0);
      y2 = min(x2, y2);
      C = (t1 * y1 + t2 * y2);
      D = (y1 + y2);
      C = C - D * t0;
      if (C < 0) continue;
      if (A * D == B * C) {
        if (y1 + y2 > mx) {
          mx = y1 + y2;
          A = C;
          B = D;
          Y1 = y1;
          Y2 = y2;
        }
      } else if (C * B < A * D) {
        mx = y1 + y2;
        Y1 = y1;
        Y2 = y2;
        A = C;
        B = D;
      }
    }
    cout << Y1 << " " << Y2 << endl;
  }
  return 0;
}
