#include <bits/stdc++.h>
using namespace std;
using ll = long long;
int main() {
  ll t0, t1, t2, x1, x2, y1, y2;
  cin >> t1 >> t2 >> x1 >> x2 >> t0;
  for (ll f = t1 * x1 + t2 * x2, g = x1 + x2, u = 1, v = 0;
       x1 >= 0 and x2 >= 0 and g > 0; --g)
    if (f < g * t0)
      --x1, f -= t1;
    else {
      if (f * v < g * u) u = f, v = g, y1 = x1, y2 = x2;
      --x2, f -= t2;
    }
  cout << y1 << ' ' << y2;
}
