#include <bits/stdc++.h>
using namespace std;
signed main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  long long a1, a2, k1, k2, n;
  cin >> a1 >> a2 >> k1 >> k2 >> n;
  long long t1 = a1 * k1;
  if (t1 < n) {
    t1 = a1 + (n - t1) / k2;
  } else {
    t1 = n / k1;
  }
  long long t2 = a2 * k2;
  if (t2 < n) {
    t2 = a2 + (n - t2) / k1;
  } else {
    t2 = n / k2;
  }
  long long t3 = (k1 - 1) * a1 + (k2 - 1) * a2;
  if (t3 < n) {
    t3 = n - t3;
  } else {
    t3 = 0;
  }
  cout << t3 << ' ' << max(t1, t2) << '\n';
  return 0;
}
