#include <bits/stdc++.h>
using namespace std;
double EPS = 1e-9;
long long t1, t2, x1, x2, t0;
long long a1 = 0, a2 = 0;
double diff = 1e20;
long long rate = 0;
long long up = 1LL << 30, dn = 1;
long long Comp(long long a1, long long b1, long long a2, long long b2) {
  return a1 * b2 - b1 * a2;
}
int main() {
  cin >> t1 >> t2 >> x1 >> x2 >> t0;
  if (t0 == t1 && t0 == t2) {
    a1 = x1;
    a2 = x2;
  } else if (t0 == t1) {
    a1 = x1;
  } else if (t0 == t2) {
    a2 = x2;
  } else {
    for (long long y1 = 0; y1 <= x1; y1++) {
      long long R = t0 * y1 - t1 * y1;
      long long L = t2 - t0;
      long long Y = (R + L - 1) / L;
      if (L < 0) {
        L *= -1;
        R *= -1;
        Y = min(x2, R / L);
      } else {
        Y = (R + L - 1) / L;
      }
      if (Y > x2) continue;
      double d = 1. * (t1 * y1 + t2 * Y) / (y1 + Y) - t0;
      R = t1 * y1 + t2 * Y;
      L = y1 + Y;
      long long nr = y1 + Y;
      if ((Comp(up, dn, R, L) == 0 && nr > rate) || Comp(up, dn, R, L) > 0) {
        rate = nr;
        diff = d;
        a1 = y1;
        a2 = Y;
        up = R;
        dn = L;
      }
    }
    swap(x1, x2);
    swap(t1, t2);
    bool sw = 0;
    for (long long y1 = 0; y1 <= x1; y1++) {
      long long R = t0 * y1 - t1 * y1;
      long long L = t2 - t0;
      long long Y = R / L;
      if (L < 0) {
        L *= -1;
        R *= -1;
        Y = min(x2, R / L);
      } else {
        Y = (R + L - 1) / L;
      }
      if (Y > x2) continue;
      double d = 1. * (t1 * y1 + t2 * Y) / (y1 + Y) - t0;
      R = t1 * y1 + t2 * Y;
      L = y1 + Y;
      long long nr = y1 + Y;
      if ((Comp(up, dn, R, L) == 0 && nr > rate) || Comp(up, dn, R, L) > 0) {
        sw = 1;
        rate = nr;
        diff = d;
        a1 = y1;
        a2 = Y;
        up = R;
        dn = L;
      }
    }
    if (sw) swap(a1, a2);
  }
  cout << a1 << " " << a2 << endl;
  return 0;
}
