#include <bits/stdc++.h>
using namespace std;
int main() {
  int a1, a2, k1, k2;
  int n;
  cin >> a1 >> a2 >> k1 >> k2 >> n;
  int n1 = n, n2 = n;
  n1 -= (a1 * (k1 - 1));
  n1 -= (a2 * (k2 - 1));
  if (n1 <= 0)
    cout << 0 << " ";
  else
    cout << n1 << " ";
  if (k1 > k2) {
    if (n2 < k2) {
      cout << 0;
      return 0;
    } else {
      n2 /= k2;
      if (n2 >= a2) {
        n -= (a2 * k2);
        if (n >= k1) {
          n /= k1;
          if (n >= a1) {
            cout << a1 + a2 << " ";
          } else {
            cout << a2 + n << " ";
          }
        } else {
          cout << a2 << " ";
        }
      } else {
        cout << n2 << " ";
      }
    }
  } else {
    if (n2 < k1) {
      cout << 0;
      return 0;
    } else {
      n2 /= k1;
      if (n2 >= a1) {
        n -= (a1 * k1);
        if (n >= k2) {
          n /= k2;
          if (n >= a2) {
            cout << a1 + a2 << " ";
          } else {
            cout << a1 + n << " ";
          }
        } else {
          cout << a1 << " ";
        }
      } else {
        cout << n2 << " ";
      }
    }
  }
  return 0;
}
