#include <bits/stdc++.h>
using namespace std;
long long t1, t2, x1, x2, t0;
long long besty1 = -1, besty2 = -1;
double bestans = 1e100;
inline double f(long long y1, long long y2) {
  return (t1 * y1 + t2 * y2) * 1.0 / (y1 + y2);
}
inline void setAns(long long y1, long long y2) {
  if (y1 + y2 == 0) return;
  if (y1 < 0 || y2 < 0 || y1 > x1 || y2 > x2) return;
  if (f(y1, y2) - t0 < 0) return;
  if (f(y1, y2) - t0 > bestans) return;
  if (f(y1, y2) - t0 < bestans) {
    besty1 = y1;
    besty2 = y2;
    bestans = f(y1, y2) - t0;
  } else if (y1 + y2 > besty1 + besty2) {
    besty1 = y1;
    besty2 = y2;
    bestans = f(y1, y2) - t0;
  }
}
int main() {
  cin >> t1 >> t2 >> x1 >> x2 >> t0;
  for (long long y1 = 0; y1 <= x1; y1++) setAns(y1, x2);
  for (long long y2 = 0; y2 <= x2; y2++) setAns(x1, y2);
  for (long long sum = 0; sum <= x1 + x2; sum++) {
    double q = (t0 * 1.0 * sum - 1.0 * t2 * sum) * 1.0 / (t1 - t2);
    for (int dx = -10; dx <= 10; dx++) setAns(int(q) + dx, sum - (int(q) + dx));
  }
  cout << besty1 << ' ' << besty2;
}
