#include <bits/stdc++.h>
using namespace std;
int main() {
  long long t1, t2, x1, x2, t0;
  cin >> t1 >> t2 >> x1 >> x2 >> t0;
  long long a = t1 - t0, b = t2 - t0;
  a = -a;
  if (a == 0 && b == 0) {
    cout << x1 << ' ' << x2;
    return 0;
  }
  long long a1 = 0, a2 = 0, opt1 = 1000LL * 1000LL * 1000LL * 1000LL * 2,
            opt2 = 1;
  for (long long i = 0; i <= x1; i++) {
    long long j = (b == 0 ? x2 : ((a * i + b - 1) / b));
    if (j > x2) continue;
    if (i == 0) j = x2;
    long long test = (-a * i + b * j);
    if (test >= 0)
      if ((test * opt2 < opt1 * (i + j)) ||
          (test * opt2 == opt1 * (i + j)) && (i + j > opt2)) {
        opt1 = test;
        opt2 = i + j;
        a1 = i;
        a2 = j;
      }
  }
  cout << a1 << ' ' << a2;
}
