#include <bits/stdc++.h>
using namespace std;
const double PI = 3.1415926535897932384626433832795;
long long gcd(long long a, long long b) {
  if (b == 0)
    return a;
  else
    return gcd(b, a % b);
}
int main() {
  long long t1, t2, x1, x2, t0, k;
  cin >> t1 >> t2 >> x1 >> x2 >> t0;
  if (t0 == t1 && t0 == t2) {
    cout << x1 << " " << x2 << endl;
    return 0;
  }
  if (t0 == t2) {
    cout << 0 << " " << x2 << endl;
    return 0;
  }
  if (t0 == t1) {
    cout << x1 << " " << 0 << endl;
    return 0;
  }
  long long ans1 = 0, ans2 = 0;
  long double w = 999999999;
  for (long long y1 = 1; y1 <= x1; y1++) {
    long long y2 = (t1 * y1 - t0 * y1) / (t0 - t2);
    while ((t1 * y1 + t2 * y2) < t0 * (y1 + y2) && y2 < x2) {
      y2++;
    }
    if (y2 > x2) y2 = x2;
    if (y2 < 0) y2 = 0;
    long double t = (t1 * y1 + t2 * y2 + 0.0) / (y1 + y2 + 0.0);
    if ((t1 * y1 + t2 * y2) == t0 * (y1 + y2)) t = t0;
    if (t >= t0) {
      if (t < w || (fabs(t - w) < 1e-9 && ans1 + ans2 < y1 + y2)) {
        ans1 = y1;
        ans2 = y2;
        w = t;
      }
    }
  }
  for (long long y2 = 1; y2 <= x2; y2++) {
    long long y1 = (t0 * y2 - t2 * y2) / (t1 - t0);
    while ((t1 * y1 + t2 * y2) < t0 * (y1 + y2) && y1 < x1) {
      y1++;
    }
    if (y1 > x1) y1 = x1;
    if (y1 < 0) y1 = 0;
    long double t = (t1 * y1 + t2 * y2 + 0.0) / (y1 + y2 + 0.0);
    if ((t1 * y1 + t2 * y2) == t0 * (y1 + y2)) t = t0;
    if (t >= t0) {
      if (t < w || (fabs(t - w) < 1e-9 && ans1 + ans2 < y1 + y2)) {
        ans1 = y1;
        ans2 = y2;
        w = t;
      }
    }
  }
  cout << ans1 << " " << ans2 << endl;
  return 0;
}
