#include <bits/stdc++.h>
using namespace std;
inline int read() {
  char c = getchar();
  int x = 0, f = 1;
  for (; !isdigit(c); c = getchar())
    if (c == '-') f = -1;
  for (; isdigit(c); c = getchar()) x = x * 10 + c - 48;
  return x * f;
}
int main() {
  long long t1, t2, x1, x2, t0;
  cin >> t1 >> t2 >> x1 >> x2 >> t0;
  if (t1 == t2) {
    cout << x1 << " " << x2 << endl;
    return 0;
  }
  if (t0 == t1) {
    cout << x1 << " " << 0 << endl;
    return 0;
  }
  long long ay1 = 0, ay2 = 0;
  long long ans = 1e18;
  for (int y2 = 0; y2 <= x2; y2++) {
    long long y1 = min((y2 * (t2 - t0)) / (t0 - t1), x1);
    if (((t1 * y1 + t2 * y2) * (ay1 + ay2) < ans * (y1 + y2)) ||
        (((t1 * y1 + t2 * y2) * (ay1 + ay2) == ans * (y1 + y2)) &&
         (y1 + y2 > ay1 + ay2))) {
      ay1 = y1;
      ay2 = y2;
      ans = t1 * y1 + t2 * y2;
    }
  }
  cout << ay1 << " " << ay2 << endl;
  return 0;
}
