#include <bits/stdc++.h>
using namespace std;
long long t1, t2, x1, x2, t0;
long long better(long long y1, long long y2, long long a1, long long a2) {
  if (y1 == 0 && y2 == 0) return false;
  if (a1 == -1 ||
      (t1 * y1 + t2 * y2) * (a1 + a2) < (t1 * a1 + t2 * a2) * (y1 + y2))
    return true;
  if ((t1 * y1 + t2 * y2) * (a1 + a2) == (t1 * a1 + t2 * a2) * (y1 + y2)) {
    if (y1 + y2 > a1 + a2) return true;
  }
  return false;
}
int main() {
  cin >> t1 >> t2 >> x1 >> x2 >> t0;
  long long a1, a2;
  a1 = -1;
  long long y1, y2;
  long long L, R;
  for (y1 = 0; y1 <= x1; y1++) {
    L = 0;
    R = x2;
    while (L <= R) {
      if (L == R) {
        y2 = L;
        if (t0 * (y1 + y2) <= t1 * y1 + t2 * y2) {
          if (better(y1, y2, a1, a2)) {
            a1 = y1;
            a2 = y2;
          }
        }
        break;
      } else if (L == R - 1) {
        if (y1 == 0 || (t1 == t2)) {
          a1 = y1;
          a2 = R;
          break;
        }
        y2 = L;
        if (t0 * (y1 + y2) <= t1 * y1 + t2 * y2) {
          if (better(y1, y2, a1, a2)) {
            a1 = y1;
            a2 = y2;
          }
        } else {
          y2 = R;
          if (t0 * (y1 + y2) <= t1 * y1 + t2 * y2) {
            if (better(y1, y2, a1, a2)) {
              a1 = y1;
              a2 = y2;
            }
          }
        }
        break;
      }
      y2 = (L + R) / 2;
      if (t0 * (y1 + y2) <= t1 * y1 + t2 * y2) {
        if (y1 == 0 || t1 == t2)
          L = y2;
        else {
          if (t1 == 1 && t2 == 1)
            L = y2;
          else
            R = y2;
        }
      } else {
        L = y2;
      }
    }
  }
  cout << a1 << " " << a2 << endl;
  return 0;
}
