#include <bits/stdc++.h>
using namespace std;
long long x[3], t[3];
long long ans[3];
double best = 1e20;
int main() {
  cin >> t[1] >> t[2] >> x[1] >> x[2] >> t[0];
  if (t[1] == t[2]) {
    cout << x[1] << " " << x[2] << endl;
    return 0;
  }
  if (t[1] == t[0]) {
    cout << x[1] << " " << 0;
    return 0;
  }
  if (t[2] == t[0]) {
    cout << 0 << " " << x[2];
    return 0;
  }
  for (int y1 = 0; y1 <= x[1]; y1++) {
    long long y2t =
        (long long)ceil(y1 * (t[0] - t[1] + .0) / (t[2] - t[0] + .0) - 1e-8);
    double p;
    p = fabs((y1 * t[1] + y2t * t[2] + .0) / (y1 + y2t + .0) - t[0]);
    if (y2t >= 0 && y2t <= x[2])
      if (p < best || fabs(p - best) < 1e-8) {
        best = p;
        ans[1] = y1;
        ans[2] = y2t;
      }
    if (y1 == 0) {
      for (int y2 = 0; y2 <= x[2]; y2++) {
        p = fabs(y2 * t[2] / (y2 + .0));
        if (p < best || (p - best) < 1e-8) {
          best = p;
          ans[1] = 0;
          ans[2] = y2;
        }
      }
    }
  }
  cout << ans[1] << " " << ans[2];
  return 0;
}
