#include <bits/stdc++.h>
using namespace std;
int main() {
  long long t1, t2, x1, x2, t0;
  while (scanf("%I64d%I64d%I64d%I64d%I64d", &t1, &t2, &x1, &x2, &t0) >= 1) {
    if (t0 == t1 && t0 == t2) {
      printf("%I64d %I64d\n", x1, x2);
      continue;
    }
    if (t0 == t1) {
      printf("%I64d 0\n", x1);
      continue;
    }
    if (t0 == t2) {
      printf("0 %I64d\n", x2);
      continue;
    }
    long long ba = t2, bb = 1;
    long long by1 = 0, by2 = x2;
    long long y2 = 1;
    for (int y1 = 1; y1 <= x1; y1++) {
      long long ca, cb;
      while (y2 <= x2) {
        ca = t1 * y1 + t2 * y2;
        cb = y1 + y2;
        if (t0 * cb <= ca) break;
        y2++;
      }
      if (y2 > x2) break;
      assert(t0 * cb <= ca);
      if (ca * bb < ba * cb) {
        ba = ca;
        bb = cb;
        by1 = y1;
        by2 = y2;
      } else if (ca * bb == ba * cb && by1 + by2 < y1 + y2) {
        ba = ca;
        bb = cb;
        by1 = y1;
        by2 = y2;
      }
    }
    assert(by1 >= 0 && by2 >= 0);
    {
      long long ca = t1 * by1 + t2 * by2;
      long long cb = by1 + by2;
      assert(cb > 0);
    }
    printf("%I64d %I64d\n", by1, by2);
  }
  return 0;
}
