#include <bits/stdc++.h>
using namespace std;
#pragma GCC optimize("Ofast")
int t1, t2, x1, x2, t0;
void nhap() {
  scanf("%d %d %d %d %d", &t1, &t2, &x1, &x2, &t0);
  long long a1 = t0 - t1, a2 = t2 - t0, y1 = 0, y2 = 0, ma = 0, mi = 1e15 + 7;
  if (!a1) {
    if (a2)
      printf("%d 0", x1);
    else
      printf("%d %d", x1, x2);
    return;
  }
  for (int i = 1; i <= x2; i++) {
    long long j = (long long)min(((long long)i * a2 / a1), (long long)x1);
    long long t = (long long)((long long)i * a2) + (long long)(-j * a1);
    if (j <= x1 && t >= 0 && (mi > t || (mi == t && ma < (long long)i + j))) {
      mi = t;
      ma = (long long)i + j;
      y1 = j;
      y2 = i;
    }
  }
  int cc = (int)x2 / y2;
  if (y1) cc = min((int)(x1 / y1), cc);
  printf("%lld %lld", y1 * cc, y2 * cc);
}
void xuli() {}
int main() {
  nhap();
  xuli();
}
