#include <bits/stdc++.h>
using namespace std;
int main() {
  int a1, a2, k1, k2, n;
  cin >> a1 >> a2 >> k1 >> k2 >> n;
  int kx = max(k1, k2), kn = min(k1, k2), ax, an, ansx, ansn;
  if (k1 > k2)
    ax = a1, an = a2;
  else
    ax = a2, an = a1;
  int nn = n;
  if ((kx - 1) * ax < n) {
    n -= (kx - 1) * ax;
    if ((kn - 1) * an < n) {
      n -= (kn - 1) * an;
      ansn = n;
    } else
      ansn = 0;
  } else
    ansn = 0;
  if (kn * an < nn) {
    nn -= kn * an;
    ansx = an;
    ansx += nn / kx;
  } else
    ansx = nn / kn;
  cout << ansn << ' ' << ansx << endl;
  return 0;
}
