#include <bits/stdc++.h>
using namespace std;
long long min(long long a, long long b) { return a < b ? a : b; }
long long max(long long a, long long b) { return a > b ? a : b; }
int main() {
  long long a, b, x, y, c, u, v;
  pair<long long, long long> ans;
  cin >> a >> b >> u >> v >> c;
  x = u, y = v;
  double t = double(a * x + b * y) / (x + y), d = double(1e20);
  while (x >= 0 && y >= 0) {
    t = double(a * x + b * y) / (x + y);
    if (t < c)
      x--;
    else {
      if (t < d) {
        d = t;
        ans = make_pair(x, y);
      }
      y--;
    }
  }
  cout << ans.first << " " << ans.second;
  return 0;
}
