#include <bits/stdc++.h>
using namespace std;
int main() {
  long long a1, a2, k1, k2, n, i, j, s = 0, m;
  vector<vector<long long>> a(2, vector<long long>(2)), b;
  cin >> a[0][1] >> a[1][1] >> a[0][0] >> a[1][0] >> n;
  sort(a.begin(), a.end());
  m = n;
  b = a;
  if (a[0][0] * a[0][1] + a[1][0] * a[1][1] - a[0][1] - a[1][1] >= n)
    cout << "0 ";
  else {
    long long k = a[1][1];
    for (i = 0; i < k; i++) {
      s++;
      a[1][1]--;
      n -= a[1][0];
      if (a[0][0] * a[0][1] + a[1][0] * a[1][1] - a[0][1] - a[1][1] >= n) break;
    }
    if (i == k) {
      k = a[0][1];
      for (i = 0; i < k; i++) {
        s++;
        a[0][1]--;
        n -= a[0][0];
        if (a[0][0] * a[0][1] - a[0][1] >= n) break;
      }
    }
    cout << s << " ";
  }
  n = m;
  a = b;
  s = min(n / a[0][0], a[0][1]);
  n -= s * a[0][0];
  long long p = n / a[1][0];
  s += min(p, a[1][1]);
  cout << s << endl;
}
