#include <bits/stdc++.h>
using namespace std;
unsigned long long t1, t2, c1, c2, t0;
unsigned long long yy1 = 0, y2 = 0;
unsigned long long resyy1, resy2;
inline bool besser(unsigned long long res1, unsigned long long res2,
                   unsigned long long res3, unsigned long long res4) {
  return res1 * t1 * res4 + res2 * t2 * res3 <
         res3 * t1 * res2 + res4 * t2 * res1;
}
inline bool eq(unsigned long long res1, unsigned long long res2,
               unsigned long long res3, unsigned long long res4) {
  return res1 * t1 * res4 + res2 * t2 * res3 ==
         res3 * t1 * res2 + res4 * t2 * res1;
}
int main() {
  cin >> t1 >> t2 >> c1 >> c2 >> t0;
  if (t1 == t2) {
    cout << c1 << " " << c2 << endl;
    return 0;
  }
  resyy1 = 0, resy2 = c2;
  yy1 = 1;
  while (yy1 <= c1) {
    while (y2 <= c2 && (t1 * yy1 + t2 * y2 < t0 * (yy1 + y2))) y2++;
    if (y2 > c2) break;
    if ((t1 * yy1 + t2 * y2 < t0 * (yy1 + y2))) {
      break;
    } else {
      if (besser(yy1, y2, resyy1, resy2)) {
        resyy1 = yy1, resy2 = y2;
        yy1++;
        continue;
      }
      if (eq(yy1, y2, resyy1, resy2) && (yy1 + y2 > resyy1 + resy2)) {
        resyy1 = yy1, resy2 = y2;
        yy1++;
        continue;
      }
    }
    yy1++;
  }
  cout << resyy1 << " " << resy2 << endl;
}
