#include <bits/stdc++.h>
using namespace std;
const long long MOD = 1e9 + 7, Base = 998244353;
const long long N = 507;
const long long INF = 1LL * 1000 * 1000 * 1000 * 1000 * 1000 * 1000 + 7LL;
const double pie = acos(-1.0);
const double EPS = 1e-9;
long long x1, x2, t1, t2, t0, a1, a2;
void Calco(long long y1, long long y2) {
  if (y2 < 0 or y2 > x2 or y1 + y2 == 0) return;
  long long T0 = t0 * (y1 + y2), Tv = t1 * y1 + t2 * y2, u, v;
  if (T0 > Tv) return;
  u = (y1 + y2) * (t1 * a1 + t2 * a2), v = (a1 + a2) * (t1 * y1 + t2 * y2);
  if (u > v)
    a1 = y1, a2 = y2;
  else if (u == v and (a1 + a2 < y1 + y2))
    a1 = y1, a2 = y2;
}
int32_t main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  cin >> t1 >> t2 >> x1 >> x2 >> t0;
  if (t1 == t2 and t0 == t1)
    cout << x1 << ' ' << x2 << '\n', exit(0);
  else if (t2 == t0)
    cout << 0 << ' ' << x2 << '\n', exit(0);
  else if (t1 == t0)
    cout << x1 << ' ' << 0 << '\n', exit(0);
  a2 = x2;
  for (long long y1 = 0; y1 <= x1; ++y1) {
    long long y2 = ((t0 - t1) * y1) / (t2 - t0);
    for (long long i = -2; i <= 2; ++i) Calco(y1, y2 + i);
  }
  cout << a1 << ' ' << a2 << '\n';
  return 0;
}
