#include <bits/stdc++.h>
using namespace std;
template <class T>
ostream& operator<<(ostream& out, const vector<T>& data) {
  out << "[";
  for (int i = 0; i < data.size(); ++i)
    out << data[i] << (i == data.size() - 1 ? "" : ",");
  out << "]";
  return out;
}
template <class T>
ostream& operator<<(ostream& out, const set<T>& s) {
  out << "{";
  for (typename set<T>::iterator itr = s.begin(); itr != s.end(); ++itr)
    out << *itr << " ";
  out << "}";
  return out;
}
template <class T>
ostream& operator<<(ostream& out, const multiset<T>& s) {
  out << "{";
  for (typename multiset<T>::iterator itr = s.begin(); itr != s.end(); ++itr)
    out << *itr << " ";
  out << "}";
  return out;
}
template <class T1, class T2>
ostream& operator<<(ostream& out, const pair<T1, T2>& p) {
  out << "(" << p.first << "," << p.second << ")";
  return out;
}
template <class T1, class T2>
ostream& operator<<(ostream& out, const map<T1, T2>& m) {
  for (typename map<T1, T2>::const_iterator itr = m.begin(); itr != m.end();
       ++itr)
    out << itr->first << "->" << itr->second << " ";
  return out;
}
long long gcd(long long a, long long b) {
  if (a % b == 0)
    return b;
  else
    return gcd(b, a % b);
}
inline int getsign(long long x) { return x >= 0 ? 1 : -1; }
class Fraction {
 public:
  long long son;
  long long mother;
  void init(long long s, long long m) {
    son = s;
    mother = m;
    reduction();
  }
  Fraction(long long s, long long m) { init(s, m); }
  Fraction() { init(0, 1); }
  Fraction(const string& line) {
    int t, s, m;
    if (line.find(' ') == string::npos) {
      if (line.find('/') != string::npos) {
        sscanf(line.data(), "%d/%d", &s, &m);
        init(s, m);
        return;
      } else {
        sscanf(line.data(), "%d", &s);
        init(s, 1);
        return;
      }
    } else {
      sscanf(line.data(), "%d %d/%d", &t, &s, &m);
      init(getsign(t) * (long long)s + (long long)t * (long long)m, m);
      return;
    }
  }
  void reduction() {
    if (mother < 0) {
      son = -son;
      mother = -mother;
    }
    long long factor = gcd(abs(son), mother);
    son /= factor;
    mother /= factor;
  }
  Fraction operator+(const Fraction& other) {
    Fraction ret;
    ret.son = son * other.mother + other.son * mother;
    ret.mother = mother * other.mother;
    ret.reduction();
    return ret;
  }
  Fraction operator-(const Fraction& other) {
    Fraction ret;
    ret.son = son * other.mother - other.son * mother;
    ret.mother = mother * other.mother;
    ret.reduction();
    return ret;
  }
  Fraction operator*(const Fraction& other) {
    Fraction ret;
    ret.son = son * other.son;
    ret.mother = mother * other.mother;
    ret.reduction();
    return ret;
  }
  Fraction operator/(const Fraction& other) {
    Fraction ret;
    ret.son = son * other.mother;
    ret.mother = mother * other.son;
    ret.reduction();
    return ret;
  }
  bool operator<(const Fraction& other) const {
    return son * other.mother < mother * other.son;
  }
  bool operator>(const Fraction& other) const {
    return son * other.mother > mother * other.son;
  }
  bool operator==(const Fraction& other) const {
    return son == other.son && mother == other.mother;
  }
  friend ostream& operator<<(ostream& out, const Fraction& other) {
    out << other.son << "/" << other.mother;
    return out;
  }
  string toIntPartString() {
    ostringstream ostr;
    if (son == 0) return "0";
    if (mother == 1) {
      ostr << son;
      return ostr.str();
    }
    if (abs(son) < mother) {
      ostr << son << "/" << mother;
      return ostr.str();
    }
    ostr << son / mother << " " << abs(son) % mother << "/" << mother;
    return ostr.str();
  }
};
long long t1, t2, x1, x2, t0;
void init() {
  cin >> t1 >> t2 >> x1 >> x2 >> t0;
  if (t1 == t2) {
    long long ans = x1 + x2;
    cout << x1 << " " << x2 << endl;
    return;
  }
  if (t2 == t0) {
    cout << 0 << " " << x2 << endl;
    return;
  }
  if (t1 == t0) {
    cout << x1 << " " << 0 << endl;
    return;
  }
  Fraction minAns = Fraction(2000000LL * 1000000LL, 1LL);
  long long ans = 0;
  long long ansx = -1, ansy;
  for (long long y1 = 0; y1 <= x1; ++y1) {
    long long t = y1 * (t0 - t1);
    long long div = (t2 - t0);
    long long y2 = (t % div == 0 ? t / div : t / div + 1);
    if (y1 + y2 == 0) y2 = x2;
    if (y2 <= x2 && y2 >= 0) {
      Fraction now = Fraction((y1 * t1 + y2 * t2) - (y1 + y2) * t0, y1 + y2);
      if (now < minAns || ((now == minAns) && y1 + y2 > ans)) {
        minAns = now;
        ans = y1 + y2;
        ansx = y1;
        ansy = y2;
      }
    }
  }
  if (ansx == -1) {
    cout << 0 << " " << 0 << endl;
    return;
  }
  cout << ansx << " " << ansy << endl;
}
void york() {}
int main() {
  init();
  york();
  return 0;
}
