#include <bits/stdc++.h>
using namespace std;
const double eps = 1e-8;
int t1, t2, x1, x2, t0;
double derive(int _y1, int _y2) {
  double _t1 = t1, _t2 = t2, y1 = _y1, y2 = _y2;
  double ret = (t1 * y1 + t2 * y2) / (y1 + y2);
  return ret;
}
int main() {
  while (cin >> t1 >> t2 >> x1 >> x2 >> t0) {
    if (t1 == t2 && t1 == t0) {
      cout << x1 << " " << x2 << endl;
      continue;
    }
    if (t1 >= t0) {
      cout << x1 << " " << 0 << endl;
      continue;
    }
    if (t2 == t0) {
      cout << 0 << " " << x2 << endl;
      continue;
    }
    double min_dist = double(1 << 30);
    int y1 = 0, y2 = 1;
    int ny1 = -1, ny2 = -1;
    while (true) {
      double t = derive(y1, y2);
      double dist = t - t0;
      if (dist >= 0 && dist < min_dist) {
        ny1 = y1, ny2 = y2;
        min_dist = dist;
      }
      if (t > t0) {
        y1++;
      } else {
        y2++;
      }
      if (y1 > x1 || y2 > x2) {
        y1 = ny1, y2 = ny2;
        break;
      }
    }
    int t = 1;
    for (; t * y1 <= x1 && t * y2 <= x2; ++t)
      ;
    if (t > 1) t--;
    y1 *= t;
    y2 *= t;
    cout << y1 << " " << y2 << endl;
  }
  return 0;
}
