#include <bits/stdc++.h>
using namespace std;
const int inf = (1 << 30);
int t1, t2, x1, x2, t;
int main(void) {
  scanf("%d %d %d %d %d", &t1, &t2, &x1, &x2, &t);
  if (t1 == t2 && t2 == t) {
    printf("%d %d", x1, x2);
    return 0;
  }
  if (t1 == t) {
    printf("%d %d", x1, 0);
    return 0;
  }
  if (t2 == t) {
    printf("%d %d", 0, x2);
    return 0;
  }
  long double maxt = 1e18;
  int curv = 0, res1 = 0, res2 = 0;
  for (long long i = 0; i <= x1; i++) {
    if ((long long)((long long)i * (long long)t1 +
                    (long long)t2 * (long long)x2) <
        (long long)t * ((long long)i + x2))
      continue;
    long long j = ((long long)t * (long long)i - (long long)i * (long long)t1) /
                  ((long long)t2 - (long long)t);
    if (i == 0) j = x2;
    while ((long long)((long long)t1 * (long long)i +
                       (long long)t2 * (long long)j) <
           (long long)t * ((long long)i + j))
      j++;
    if (!(0 <= i && i <= x1 && 0 <= j && j <= x2)) continue;
    long double curt = (long double)((long long)t1 * (long long)i +
                                     (long long)t2 * (long long)j) /
                       (long double)(i + j);
    if (curt < maxt) {
      maxt = curt;
      res1 = i, res2 = j;
      curv = i + j;
    } else {
      if (fabs(curt - maxt) < 1e-13) {
        if (i + j > curv) curv = i + j, res1 = i, res2 = j;
      }
    }
  }
  assert(res1 >= 0 && res1 <= x1 && res2 >= 0 && res2 <= x2);
  cout << res1 << " " << res2 << endl;
  return 0;
}
