#include <bits/stdc++.h>
using namespace std;
const double dinf = 1e200;
void ext(int c) {}
long long gcd(long long a, long long b) { return a ? gcd(b % a, a) : b; }
int main() {
  long long t1, t2, x1, x2, t0;
  cin >> t1 >> t2 >> x1 >> x2 >> t0;
  if (t1 == t2) {
    cout << x1 << ' ' << x2;
    return 0;
  }
  pair<pair<double, long long>, pair<long long, long long> > res(
      make_pair(1e200, 0LL), make_pair(0LL, 0LL));
  res = min(res, make_pair(make_pair(t2 * 1., -x2), make_pair(0LL, x2)));
  if (t0 == t1)
    res = min(res, make_pair(make_pair(t1 * 1., -x1), make_pair(x1, 0LL)));
  for (long long asdy1 = 0; asdy1 <= x1; ++asdy1) {
    long long a = asdy1 ? 0 : 1, b = x2 + 2;
    while (b > a + 1) {
      long long v = (a + b) / 2;
      if (t1 * asdy1 + t2 * (v - 1) >= t0 * (asdy1 + v - 1))
        b = v;
      else
        a = v;
    }
    if (a > x2) continue;
    long long tt1 = t1 * asdy1 + t2 * a;
    long long tt2 = asdy1 + a;
    long long g = gcd(tt1, tt2);
    tt1 /= g;
    tt2 /= g;
    res = min(res, make_pair(make_pair(1. * tt1 / tt2, -(asdy1 + a)),
                             make_pair(asdy1, a)));
  }
  cout << res.second.first << ' ' << res.second.second;
  return 0;
}
