#include <bits/stdc++.h>
using namespace std;
int main() {
  int $ = 1;
  while ($--) {
    int a, b, c, d, e;
    cin >> a >> b >> c >> d >> e;
    int mx = 0, k = a + b;
    if (c < d) {
      while (a && e >= c) {
        mx++;
        a--;
        e -= c;
      }
      while (b && e >= d) {
        mx++;
        b--;
        e -= d;
      }
    } else {
      while (b && e >= d) {
        mx++;
        b--;
        e -= d;
      }
      while (a && e >= c) {
        mx++;
        a--;
        e -= c;
      }
    }
    int mn = k - a - b;
    if (a) {
      mn -= max(0, a * c - e - a);
      e = 0;
    }
    if (b) {
      mn -= max(0, b * d - e - b);
      e = 0;
    }
    mn = max(0, mn);
    cout << mn << " " << mx << endl;
  }
}
