#include <bits/stdc++.h>
using namespace std;
const int inf(1010101010);
struct frac {
  long long p, q;
  frac(long long p, long long q) : p(p), q(q) {}
  bool operator<(frac const& f) const { return p * f.q < q * f.p; }
};
long long cdiv(long long p, long long q) { return (p + q - 1) / q; }
int main() {
  long long t1, t2, x1, x2, C;
  cin >> t1 >> t2 >> x1 >> x2 >> C;
  if (t2 == C) {
    if (t1 == C)
      cout << x1 << " " << x2 << endl;
    else
      cout << 0 << " " << x2 << endl;
  } else {
    pair<pair<frac, long long>, pair<long long, long long> > opt(
        make_pair(make_pair(frac(inf, 1), 0), make_pair(0, 0)));
    opt = make_pair(make_pair(frac(t2 * x2, x2), -x2), make_pair(0LL, x2));
    for (long long y1(1); y1 <= (x1); y1++) {
      long long y2(cdiv(y1 * (C - t1), t2 - C));
      if (y2 <= x2) {
        opt = min(opt, make_pair(make_pair(frac(t1 * y1 + t2 * y2, y1 + y2),
                                           -(y1 + y2)),
                                 make_pair(y1, y2)));
      }
    }
    cout << opt.second.first << " " << opt.second.second << endl;
  }
}
