#include <bits/stdc++.h>
using namespace std;
pair<long long, long long> ans;
int t[5], x[2];
bool cmp(pair<long long, long long> a, pair<long long, long long> b) {
  if (-t[3] * b.first + t[4] * b.second < 0) return false;
  long long tmp = (b.first + b.second) * (t[1] * a.first + t[2] * a.second) -
                  (a.first + a.second) * (t[1] * b.first + t[2] * b.second);
  if (tmp > 0) return true;
  if (tmp == 0) return b.first + b.second > a.first + a.second;
  return false;
}
int main() {
  while (scanf("%d%d%d%d%d", &t[1], &t[2], &x[0], &x[1], &t[0]) == 5) {
    t[3] = t[0] - t[1];
    t[4] = t[2] - t[0];
    int a = (t[1] == t[0]) ? x[0] : 0, b = (t[2] == t[0]) ? x[1] : 0;
    if (a || b) {
      printf("%d %d\n", a, b);
      continue;
    }
    ans = make_pair(0, x[1]);
    pair<long long, long long> tmp;
    for (int i = x[0]; i >= 0; --i) {
      tmp = make_pair(i, (long long)i * t[3] / t[4]);
      if (tmp.second > x[1]) continue;
      if (cmp(ans, tmp)) ans = tmp;
      ++tmp.second;
      if (tmp.second > x[1]) continue;
      if (cmp(ans, tmp)) ans = tmp;
    }
    cout << ans.first << ' ' << ans.second << '\n';
  }
  return 0;
}
