#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int a1, a2, k1, k2, n, nrmx = 0, a3, a4, k3, k4, n1, nrmn = 0;
  cin >> a1 >> a2 >> k1 >> k2 >> n;
  a3 = a1;
  a4 = a2;
  k3 = k1;
  k4 = k2;
  n1 = n;
  if (k3 < k4) {
    swap(a3, a4);
    swap(k3, k4);
  }
  n1 -= (k3 - 1) * a3;
  n1 -= (k4 - 1) * a4;
  nrmn = max(0, min(n1, a3 + a4));
  if (k1 > k2) {
    swap(a1, a2);
    swap(k1, k2);
  }
  nrmx += (min(n, k1 * a1) / k1);
  n -= nrmx * k1;
  nrmx += (min(n, k2 * a2) / k2);
  cout << nrmn << " " << nrmx << endl;
  return 0;
}
