#include <bits/stdc++.h>
using namespace std;
long long i, n, x1, x2, t1, t2, t0, a[11111111], j, b1, b2, b3, b4;
int main() {
  cin >> t1 >> t2 >> x1 >> x2 >> t0;
  if (t2 == t0) {
    if (t1 == t0)
      cout << x1 << " " << x2;
    else
      cout << 0 << " " << x2;
    return 0;
  }
  if (t1 == t0) {
    cout << x1 << " " << 0;
    return 0;
  }
  for (i = 0; i <= x1; i++) {
    a[i] = (t0 * i - t1 * i + t2 - t0 - 1) / (t2 - t0);
    if (a[i] <= x2) {
      b1 = t1 * i + t2 * a[i];
      b2 = j + a[j];
      b3 = t1 * j + t2 * a[j];
      b4 = i + a[i];
      if (b1 * b2 <= b3 * b4) j = i;
    }
  }
  if (j > 0) {
    n = x1 / j;
    if (n > x2 / a[j]) n = x2 / a[j];
    cout << j * n << " " << n * a[j];
  } else
    cout << 0 << " " << x2;
}
