#include <bits/stdc++.h>
using namespace std;
int main() {
  int t1, t2, x1, x2, t0;
  cin >> t1 >> t2 >> x1 >> x2 >> t0;
  if (t1 == t2) {
    cout << x1 << " " << x2 << endl;
    return 0;
  } else if (t1 == t0) {
    cout << x1 << " 0" << endl;
    return 0;
  } else if (t2 == t0) {
    cout << "0 " << x2 << endl;
    return 0;
  }
  long long by1 = 0;
  long long by2 = 1;
  for (long long y_warm = 1; y_warm <= x2; ++y_warm) {
    long long y_cold = min<int>((t2 - t0) * y_warm / (t0 - t1), x1);
    long long diff = (t1 * by1 + t2 * by2) * (y_cold + y_warm) -
                     (t1 * y_cold + t2 * y_warm) * (by1 + by2);
    if (diff > 0LL || (diff == 0 && ((by1 + by2) < (y_warm + y_cold)))) {
      by1 = y_cold;
      by2 = y_warm;
    }
  }
  cout << by1 << " " << by2 << endl;
  return 0;
}
