#include <bits/stdc++.h>
using namespace std;
long long t1, t2, x1, x2, t0, ans1, ans2, z1, z2, y20;
inline void trr(const long long& y1_gdssdfjsdgf, const long long& y2) {
  if (y1_gdssdfjsdgf == 0 && y2 == 0) return;
  if (ans1 == -1) {
    if ((y1_gdssdfjsdgf * t1 + y2 * t2) >= t0 * (y1_gdssdfjsdgf + y2)) {
      ans1 = y1_gdssdfjsdgf;
      ans2 = y2;
    }
    return;
  }
  z1 = (ans1 * t1 + ans2 * t2) * (y1_gdssdfjsdgf + y2) -
       t0 * (y1_gdssdfjsdgf + y2) * (ans1 + ans2);
  z2 = (y1_gdssdfjsdgf * t1 + y2 * t2) * (ans1 + ans2) -
       t0 * (y1_gdssdfjsdgf + y2) * (ans1 + ans2);
  if ((z1 >= 0 && z2 >= 0) &&
      (z1 > z2 || ((z1 == z2) && (y1_gdssdfjsdgf + y2 > ans1 + ans2)))) {
    ans1 = y1_gdssdfjsdgf;
    ans2 = y2;
  }
}
int main() {
  cin >> t1 >> t2 >> x1 >> x2 >> t0;
  ans1 = -1;
  ans2 = -1;
  trr(0, x2);
  trr(x1, 0);
  trr(x1, x2);
  for (long long y1_gdssdfjsdgf = 0; y1_gdssdfjsdgf <= x1; y1_gdssdfjsdgf++)
    if (t2 != t0) {
      y20 = ((t0 - t1) * y1_gdssdfjsdgf) / (t2 - t0);
      for (long long y2 = max(0LL, y20 - 2); y2 <= min(x2, y20 + 2); y2++) {
        trr(y1_gdssdfjsdgf, y2);
      }
    }
  cout << ans1 << " " << ans2 << endl;
  return 0;
}
