#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int teamA, teamB, y1, y2, y;
  cin >> teamA >> teamB >> y1 >> y2 >> y;
  int min = y - (teamA * (y1 - 1) + teamB * (y2 - 1));
  if (min < 0) {
    cout << 0 << " ";
  } else {
    cout << min << " ";
  }
  int max = y - teamA * y1 - teamB * y2;
  if (max < 0) {
    if (y2 < y1) {
      max = y - teamB * y2;
      if (max < 0) {
        cout << y / y2 << endl;
        return 0;
      } else if (max == 0) {
        cout << teamB << endl;
        return 0;
      }
      cout << teamB + max / y1 << endl;
      return 0;
    } else {
      max = y - teamA * y1;
      if (max < 0) {
        cout << y / y1 << endl;
        return 0;
      } else if (max == 0) {
        cout << teamA << endl;
        return 0;
      }
      cout << teamA + max / y2 << endl;
      return 0;
    }
  } else {
    cout << teamA + teamB << endl;
  }
  return 0;
}
