#include <bits/stdc++.h>
using namespace std;
long long usg(long long x, long long y) {
  if (y == 0)
    return x;
  else
    return usg(y, x % y);
}
double jami;
long long p, ans1, ans2, a, b, t1, t2, t0, x1, x2, k1, k2, ans;
long long i;
int main() {
  cin >> t1 >> t2 >> x1 >> x2 >> t0;
  a = t2 - t0;
  b = t0 - t1;
  if (a == 0 && b == 0) {
    cout << x1 << " " << x2 << endl;
    return 0;
  }
  if (a == 0) {
    cout << "0 " << x2 << endl;
    return 0;
  }
  if (b == 0) {
    cout << x1 << " 0" << endl;
    return 0;
  }
  p = usg(a, b);
  a /= p;
  b /= p;
  k1 = x1 / a;
  k2 = x2 / b;
  if (min(k1, k2) > 0) {
    a *= min(k1, k2);
    b *= min(k1, k2);
  }
  if (a <= x1 && b <= x2)
    cout << a << " " << b << endl;
  else {
    for (i = 0; i <= x1; i++) {
      jami = (double)(i * b / a) - 0.00000001;
      ans = round(jami);
      if ((i * b) % a > 0) ans = floor(jami + 1.00001);
      if (ans1 * ans <= i * ans2 && ans <= x2 && i <= x1) {
        ans1 = i;
        if (i == 0)
          ans2 = x2;
        else
          ans2 = ans;
      }
    }
    cout << ans1 << " " << ans2 << endl;
  }
  return 0;
}
