#include <bits/stdc++.h>
using namespace std;
long long my1 = -1, my2 = -1;
int t0, t1, t2, x1, x2;
double tb;
void bs(long long h) {
  long long l = 0, r = x2, mid;
  while (l < r) {
    mid = (l + r) / 2;
    if (h * t1 + mid * t2 >= (h + mid) * t0 && h + mid > 0)
      r = mid;
    else
      l = mid + 1;
  }
  if (h * t1 + l * t2 < (h + l) * t0) return;
  if (my2 == -1 ||
      (h * t1 + l * t2) * (my1 + my2) < (my1 * t1 + my2 * t2) * (h + l) ||
      (h * my2 == l * my1 && h + l > my1 + my2)) {
    int tmp = min(h > 0 ? x1 / h : 1000000000, l > 0 ? x2 / l : 1000000000);
    my1 = h * tmp, my2 = l * tmp;
  }
}
int main() {
  cin >> t1 >> t2 >> x1 >> x2 >> t0;
  if (t1 == t2) {
    cout << x1 << ' ' << x2 << '\n';
    return 0;
  }
  for (int i = 0; i <= x1; ++i) bs(i);
  cout << my1 << ' ' << my2;
  return 0;
}
