#include <bits/stdc++.h>
using namespace std;
bool near(long long A, long long B, long long X, long long Y, long long T) {
  if ((X - Y * T) < 0) return (0);
  if ((A - B * T) * Y != (X - Y * T) * B)
    return ((A - B * T) * Y > (X - Y * T) * B);
  return (B < Y);
}
int main() {
  int t1, t2, x1, x2, t0;
  scanf("%d %d %d %d %d", &t1, &t2, &x1, &x2, &t0);
  if (t1 == t0 || t2 == t0) {
    int a1 = x1 * (t1 == t0);
    int a2 = x2 * (t2 == t0);
    printf("%d %d\n", a1, a2);
    return (0);
  }
  int dmin = t2 - t0;
  int ret1 = 0, ret2 = x2;
  for (int i = 1; i <= x1; i++) {
    long long y = ((long long)(t0 - t1) * i) / (t2 - t0);
    int y2 = min(y, (long long)x2);
    for (int j = max(0, y2 - 1); j <= min(x2, y2 + 1); j++) {
      if (near((long long)t1 * ret1 + (long long)t2 * ret2, ret1 + ret2,
               (long long)t1 * i + (long long)t2 * j, i + j, t0)) {
        ret1 = i;
        ret2 = j;
      }
    }
  }
  printf("%d %d\n", ret1, ret2);
  return (0);
}
