#include <bits/stdc++.h>
using namespace std;
const long long inf = 2000000000;
int main() {
  long long t1, t2, x1, x2, t0, y1, y2, l, r, ans_1 = -1, ans_2 = -1,
                                              max_time = -inf, cycle;
  double t, eps = inf * 1.0;
  cin >> t1 >> t2 >> x1 >> x2 >> t0;
  if (t1 == t2) {
    cout << x1 << " " << x2;
    return 0;
  } else if (t1 == t0) {
    cout << x1 << " " << 0;
    return 0;
  } else if (t2 == t0) {
    cout << 0 << " " << x2;
    return 0;
  }
  for (y1 = 0; y1 <= x1; y1++) {
    l = 0;
    r = x2;
    while (l <= r) {
      y2 = (l + r) / 2;
      t = double(t1 * y1 + t2 * y2) / double(y1 + y2);
      if (t >= t0) {
        r = y2 - 1;
        if (t - t0 < eps || (t - t0 == eps && y1 + y2 > max_time)) {
          max_time = y1 + y2;
          eps = t - t0;
          ans_1 = y1;
          ans_2 = y2;
        }
      } else {
        l = y2 + 1;
      }
    }
  }
  if (ans_1 == 0 && ans_2 != 0)
    ans_2 = x2;
  else if (ans_1 != 0 && ans_2 == 0)
    ans_1 = x1;
  cout << ans_1 << " " << ans_2;
  return 0;
}
