#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e5 + 10;
int main() {
  long long t1, t2, x1, x2, t;
  scanf("%lld%lld%lld%lld%lld", &t1, &t2, &x1, &x2, &t);
  if (t == t1 && t == t2) {
    printf("%lld %lld\n", x1, x2);
    return 0;
  }
  if (t == t1) {
    printf("%lld 0\n", x1);
    return 0;
  }
  if (t == t2) {
    printf("0 %lld\n", x2);
    return 0;
  }
  long long ans1 = 0, ans2 = x2, d = t2 - t;
  for (long long i = 1; i <= x1; i++) {
    long long num = (t - t1) * i + d - 1;
    long long val = num / d;
    if (val > x2) continue;
    long long x = (ans1 * t1 + ans2 * t2) * (i + val);
    long long y = (ans1 + ans2) * (i * t1 + val * t2);
    if (x > y || (x == y && i + val > ans1 + ans2)) ans1 = i, ans2 = val;
  }
  printf("%lld %lld\n", ans1, ans2);
  return 0;
}
