#include <bits/stdc++.h>
using namespace std;
const long long lim = 1e18;
long long t1, t2, x1, x2, t, y2;
long long ans1 = -1, ans2 = -1;
long long check(long long y1) {
  long long lhs = t1 * y1 + t2 * y2;
  long long rhs = t * (y1 + y2);
  return lhs >= rhs;
}
long long binsearch(long long lo, long long hi) {
  while (lo < hi) {
    long long mid = (lo + hi + 1) >> 1;
    if (check(mid)) {
      lo = mid;
    } else {
      hi = mid - 1;
    }
  }
  return lo;
}
int32_t main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  ;
  cin >> t1 >> t2 >> x1 >> x2 >> t;
  for (y2 = 0; y2 <= x2; y2++) {
    long long y1 = binsearch(0, x1);
    if (check(y1)) {
      if (ans1 == -1) {
        ans1 = y1;
        ans2 = y2;
        continue;
      }
      long long origt = (t1 * ans1 + t2 * ans2) * (y1 + y2);
      long long curt = (t1 * y1 + t2 * y2) * (ans1 + ans2);
      if (curt < origt) {
        ans1 = y1;
        ans2 = y2;
      } else if (origt == curt && y1 + y2 > ans1 + ans2) {
        ans1 = y1;
        ans2 = y2;
      }
    }
  }
  cout << ans1 << " " << ans2;
  return 0;
}
