#include <bits/stdc++.h>
using namespace std;
int main() {
  int a1, a2, k1, k2, n, t;
  int x, y, z;
  cin >> a1 >> a2 >> k1 >> k2 >> n;
  t = n;
  int ans1 = 0, ans2 = 0;
  n = n - ((a1) * (k1 - 1)) - ((a2 * (k2 - 1)));
  if (n > 0) ans1 = min(n, a1 + a2);
  n = t;
  if (k1 > k2) {
    swap(a1, a2);
    swap(k1, k2);
  }
  if (k1 <= k2) {
    x = n / k1;
    if (x >= a1) {
      ans2 = a1;
      n -= (a1 * k1);
    } else {
      ans2 = x;
      n -= (x * k1);
    }
    x = n / k2;
    if (x >= a2)
      ans2 += a2;
    else
      ans2 += x;
  }
  cout << ans1 << " " << ans2 << endl;
  return 0;
}
