#include <bits/stdc++.h>
using namespace std;
int t1, t2, t0, x1, x2;
inline int gcd(int x, int y) { return y ? gcd(y, x % y) : x; }
inline int fmin(int x, int y, int xx, int yy) {
  return (long long)x * yy <= (long long)xx * y;
}
void solve() {
  if (t1 == t2) {
    printf("%d %d\n", x1, x2);
    return;
  }
  if (t1 == t0) {
    printf("%d 0\n", x1);
    return;
  }
  if (t2 == t0) {
    printf("0 %d\n", x2);
    return;
  }
  int a = (t0 - t1), b = (t2 - t0), d;
  d = gcd(a, b);
  a /= d;
  b /= d;
  if (a <= x2 && b <= x1) {
    d = min(x2 / a, x1 / b);
    printf("%d %d\n", b * d, a * d);
    return;
  }
  int resa = x2, resb = 0;
  if (a > x2) {
    for (int bb, aa = 1; aa <= x2; ++aa) {
      bb = (int)((double)aa * b / a);
      bb = min(bb, x1);
      if (fmin(a, b, aa, bb) && fmin(aa, bb, resa, resb)) {
        resa = aa;
        resb = bb;
      }
    }
  } else {
    for (int aa, bb = 1; bb <= x1; ++bb) {
      aa = (int)((double)bb * a / b) + 1;
      aa = min(aa, x2);
      if (fmin(a, b, aa, bb) && fmin(aa, bb, resa, resb)) {
        resa = aa;
        resb = bb;
      }
    }
  }
  printf("%d %d\n", resb, resa);
}
int main() {
  scanf("%d%d%d%d%d", &t1, &t2, &x1, &x2, &t0);
  solve();
  return 0;
}
