#include <bits/stdc++.h>
using namespace std;
long long t1, t2, x1, x2, t0;
int gcd(int a, int b) {
  if (b) return gcd(b, a % b);
  return a;
}
int main() {
  cin >> t1 >> t2 >> x1 >> x2 >> t0;
  long long A = t2 - t0, B = t0 - t1;
  long long temp = gcd(A, B);
  if (A == 0 && B == 0) {
    cout << x1 << " " << x2;
    return 0;
  }
  if (A == 0) {
    cout << 0 << " " << x2;
    return 0;
  }
  if (B == 0) {
    cout << x1 << " " << 0;
    return 0;
  }
  A /= temp, B /= temp;
  long long ans1 = 1, ans2 = 1;
  double DT = 1000000007LL;
  for (int i = 1; i < x2 + 1; i++) {
    long long cold = i * A / B;
    if (cold > x1) cold = x1;
    double dT = fabs((cold * t1 + i * t2) * 1. / (cold + i) - t0);
    if (dT < DT + 1e-9) ans1 = cold, ans2 = i, DT = dT;
  }
  cout << ans1 << " " << ans2;
}
