#include <bits/stdc++.h>
using namespace std;
const int N = 100005;
int main() {
  long long t1, t2, x1, x2, t0;
  cin >> t1 >> t2 >> x1 >> x2 >> t0;
  long long ans1 = -1, ans2 = -1;
  for (long long y1 = 0; y1 <= x1; y1++) {
    long long ri = (y1 * (t0 - t1) + t2 - t0 - 1);
    if (t2 == t0) {
      if (y1 * (t0 - t1) == 0)
        ri = 0;
      else
        ri = x2 + 1;
    } else
      ri /= t2 - t0;
    if (y1 == 0 && ri == 0) ri = 1;
    if (ri > x2) continue;
    long long y2 = ri;
    long long le = ri;
    ri = x2 + 1;
    while (le + 1 < ri) {
      long long mid = (le + ri) >> 1;
      if ((t1 * y1 + t2 * y2) * (y1 + mid) == (y1 + y2) * (t1 * y1 + t2 * mid))
        le = mid;
      else
        ri = mid;
    }
    y2 = le;
    if (ans1 == -1 || (ans1 + ans2) * (t1 * y1 + t2 * y2) <
                          (y1 + y2) * (t1 * ans1 + t2 * ans2))
      ans1 = y1, ans2 = y2;
    else if ((ans1 + ans2) * (t1 * y1 + t2 * y2) ==
                 (y1 + y2) * (t1 * ans1 + t2 * ans2) &&
             y1 + y2 > ans1 + ans2)
      ans1 = y1, ans2 = y2;
  }
  cout << ans1 << " " << ans2 << endl;
  return 0;
}
