#include <bits/stdc++.h>
using namespace std;
int gcd(int x, int y) { return y ? gcd(y, x % y) : x; }
int main() {
  long long t1, t2, x1, x2, t0, Ans1, Ans2;
  scanf("%I64d%I64d%I64d%I64d%I64d", &t1, &t2, &x1, &x2, &t0);
  int kx = t2 - t0, ky = t0 - t1, k = gcd(kx, ky);
  if (k) {
    kx /= k;
    ky /= k;
  }
  if (kx == 0 && ky > 0) {
    Ans1 = 0;
    Ans2 = x2;
  }
  if (ky == 0 && kx > 0) {
    Ans1 = x1;
    Ans2 = 0;
  }
  if (kx == 0 && ky == 0) {
    Ans1 = x1;
    Ans2 = x2;
  }
  if (kx > 0 && ky > 0) {
    long long t = min(x1 / kx, x2 / ky);
    if (t > 0) {
      Ans1 = t * kx;
      Ans2 = t * ky;
    }
    if (t == 0) {
      long long Minp = 1000000000, Minq = 0;
      for (long long y1 = 1; y1 <= x1; y1++) {
        long long y2 = y1 * ky / kx;
        while (t1 * y1 + t2 * y2 < t0 * (y1 + y2)) y2++;
        if (y2 <= x2)
          if ((t1 * y1 + t2 * y2) * Minq <= Minp * (y1 + y2)) {
            Minp = t1 * y1 + t2 * y2;
            Minq = y1 + y2;
            Ans1 = y1;
            Ans2 = y2;
          }
      }
      if (t2 * Minq <= Minp) {
        Ans1 = 0;
        Ans2 = x2;
      }
    }
  }
  printf("%I64d %I64d\n", Ans1, Ans2);
  return 0;
}
