#include <bits/stdc++.h>
using namespace std;
bool lessthan(long long ts1, long long ms1, long long ts2, long long ms2) {
  return (ts1 * ms2) <= (ms1 * ts2);
}
long long tri(long long a) {
  if (a < 0) return -a;
  return a;
}
int main() {
  long long t1, t2, x1, x2, t0;
  cin >> t1 >> t2 >> x1 >> x2 >> t0;
  long long ts = t0 - t1, ms = t2 - t0;
  int i;
  if (ts == 0 && ms == 0) {
    cout << x1 << " " << x2;
    return 0;
  }
  if (ts == 0) {
    cout << x1 << " 0";
    return 0;
  }
  if (ms == 0) {
    cout << "0 " << x2;
    return 0;
  }
  long long best1 = 0, best2 = 0;
  long temp1;
  for (int temp2 = 1; temp2 <= x2; temp2++) {
    temp1 = temp2 * ms / ts;
    if (temp1 > x1) {
      if (lessthan(tri(temp2 * ms - x1 * ts), x1 * ms,
                   tri(best2 * ms - best1 * ts), best1 * ms)) {
        best1 = x1;
        best2 = temp2;
      }
      break;
    }
    if (temp1 <= x1 && lessthan(tri(temp2 * ms - temp1 * ts), temp1 * ms,
                                tri(best2 * ms - best1 * ts), best1 * ms)) {
      best1 = temp1;
      best2 = temp2;
    }
  }
  cout << best1 << " " << best2;
  return 0;
}
