#include <bits/stdc++.h>
using namespace std;
const double pi =
    3.141592653589793238462643383279502884197169399375105820974944592307816406286208998628034825342;
int T1, T2, X1, X2, t0, Y1, Y2;
long long findY2() {
  long long sum1 = Y1 * (long long)T1, sum2 = t0 * (long long)Y1;
  long long add = T2 - t0;
  if (!add)
    if (sum1 >= sum2)
      return X2;
    else
      return -1;
  if (sum1 >= sum2 && Y1) return 0;
  if (add < 0) return -1;
  if (!Y1) return 1;
  long long res = (sum2 - sum1) / add;
  if ((sum2 - sum1) % add) res++;
  return res;
}
long long findY1() {
  long long sum1 = Y2 * (long long)T2, sum2 = t0 * (long long)Y2;
  long long add = T1 - t0;
  if (!add)
    if (sum1 >= sum2)
      return X1;
    else
      return -1;
  if (sum1 >= sum2 && Y2) return 0;
  if (add < 0) return -1;
  if (!Y2) return 1;
  long long res = (sum2 - sum1) / add;
  if ((sum2 - sum1) % add) res++;
  return res;
}
int main() {
  scanf("%d%d%d%d%d", &T1, &T2, &X1, &X2, &t0);
  pair<long long, long long> res(-1, -1);
  pair<int, int> res1;
  for (Y1 = 0; Y1 <= X1; Y1++) {
    long long pom = findY2();
    if (pom >= 0 && pom <= X2) {
      if (res.first == -1) {
        res = make_pair(Y1 * (long long)T1 + pom * (long long)T2, Y1 + pom);
        res1 = make_pair(Y1, pom);
      } else if (res.first * (long long)(pom + Y1) >
                     res.second * (Y1 * (long long)T1 + pom * (long long)T2) ||
                 (res.first * (long long)(pom + Y1) ==
                      res.second * (Y1 * (long long)T1 + pom * (long long)T2) &&
                  Y1 + pom > res.second)) {
        res = make_pair(Y1 * (long long)T1 + pom * (long long)T2, Y1 + pom);
        res1 = make_pair(Y1, pom);
      }
    }
  }
  for (Y2 = 0; Y2 <= X2; Y2++) {
    long long pom = findY1();
    if (pom >= 0 && pom <= X1) {
      if (res.first == -1) {
        res = make_pair(pom * (long long)T1 + Y2 * (long long)T2, Y2 + pom);
        res1 = make_pair(pom, Y2);
      } else if (res.first * (long long)(pom + Y2) >
                     res.second * (pom * (long long)T1 + Y2 * (long long)T2) ||
                 (res.first * (long long)(pom + Y2) ==
                      res.second * (pom * (long long)T1 + Y2 * (long long)T2) &&
                  Y2 + pom > res.second)) {
        res = make_pair(pom * (long long)T1 + Y2 * (long long)T2, Y2 + pom);
        res1 = make_pair(pom, Y2);
      }
    }
  }
  printf("%d %d\n", res1.first, res1.second);
  return 0;
}
