#include <bits/stdc++.h>
using namespace std;
long long int t1, t2, x1, x2;
double temp;
double te(long long int f1, long long f2) {
  long long x, y;
  x = f1 * t1;
  y = f2 * t2;
  double d;
  d = ((x + y) * 1.0) / (f1 + f2);
  return d;
}
long long int func(long long int f1, long long int t) {
  if (te(f1, x2) < t) {
    return -1;
  }
  double d;
  long long p, q;
  p = f1 * (t1 - t);
  q = t - t2;
  d = (p * 1.0) / q;
  if ((int)d != d) d++;
  long long int ans = (int)d;
  if (!ans && !f1) ans++;
  while (te(f1, ans) == te(f1, ans + 1) && ans < x2) ans++;
  temp = te(f1, ans) - t + 0.0;
  return ans;
}
int main() {
  long long int f1, f2, t;
  cin >> t1 >> t2 >> x1 >> x2 >> t;
  if (t1 == t && t2 == t) {
    cout << x1 << " " << x2 << endl;
    return 0;
  }
  if (t1 == t) {
    cout << x1 << " 0" << endl;
    return 0;
  }
  if (t2 == t) {
    cout << "0 " << x2 << endl;
    return 0;
  }
  int max_f1 = -1, max_f2 = -1;
  double minimum_dif = 100000000.0;
  for (f1 = 0; f1 <= x1; f1++) {
    f2 = func(f1, t);
    if (f2 == -1) continue;
    if (temp <= minimum_dif) {
      if (temp == minimum_dif) {
        if (f1 + f2 > max_f1 + max_f2) {
          minimum_dif = temp;
          max_f1 = f1;
          max_f2 = f2;
        }
      } else {
        minimum_dif = temp;
        max_f1 = f1;
        max_f2 = f2;
      }
    }
  }
  cout << max_f1 << " " << max_f2 << endl;
  return 0;
}
