#include <bits/stdc++.h>
using namespace std;
int t[10], x[10];
void ANS(int a, int b) {
  printf("%d %d\n", a, b);
  exit(0);
}
double calc(int a, int b) {
  return (double)(1ll * a * t[1] + 1ll * b * t[2]) / (a + b);
}
int main() {
  scanf("%d%d%d%d%d", &t[1], &t[2], &x[1], &x[2], &t[0]);
  if (t[0] == t[1] && t[0] == t[2]) ANS(x[1], x[2]);
  if (t[0] == t[2]) ANS(0, x[2]);
  double ans = 1e18;
  for (int i = x[1]; i >= 1; i--) {
    long long b = (1ll * (t[0] - t[1]) * i + t[2] - t[0] - 1) / (t[2] - t[0]);
    if (b <= x[2]) {
      ans = min(ans, calc(i, b));
    }
  }
  for (int i = x[1]; i >= 1; i--) {
    long long b = (1ll * (t[0] - t[1]) * i + t[2] - t[0] - 1) / (t[2] - t[0]);
    if (b <= x[2] && fabs(ans - calc(i, b)) < 1e-6) ANS(i, b);
  }
  ANS(0, x[2]);
  return 0;
}
