#include <bits/stdc++.h>
#pragma GCC optimize("O3")
#pragma GCC target("sse4")
using namespace std;
template <class T>
T gcd(T a, T b) {
  return ((b == 0) ? a : gcd(b, a % b));
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  int a, b;
  cin >> a >> b;
  int k, k1;
  cin >> k >> k1;
  int n;
  cin >> n;
  int ans;
  if (k < k1) {
    int mx = min(n / k, a);
    int ot = n - (mx * k);
    mx += min(b, (ot / k1));
    ans = mx;
  } else {
    int mx = min(n / k1, b);
    int ot = n - (mx * k1);
    mx += min(a, ot / k);
    ans = mx;
  }
  int ans1;
  if (n >= ((a * k) + (b * k1))) {
    ans1 = (a + b);
  } else {
    int sum = (a * (k - 1)) + (b * (k1 - 1));
    if (sum >= n) {
      ans1 = 0;
    } else {
      ans1 = min(a + b, n - (sum));
    }
  }
  cout << ans1 << " " << ans << endl;
  return 0;
}
