#include <bits/stdc++.h>
using namespace std;
const int mx = 2e5 + 100;
const int md = 1000000007;
priority_queue<int, vector<int>, greater<int> > pq;
bool compare(pair<int, int> &a, pair<int, int> &b) { return a.first > b.first; }
int main() {
  int a1, a2, k1, k2, n, ans1 = 0, ans2 = 0, temp;
  cin >> a1 >> a2 >> k1 >> k2 >> n;
  temp = n;
  if (k1 == 1 and k2 == 1) {
    ans1 = min(a1 + a2, n);
    ans2 = ans1;
  } else {
    if (k1 < k2) {
      swap(k1, k2);
      swap(a1, a2);
    }
    for (int i = 0; i < a1; i += 1) {
      if (temp >= k1 - 1) {
        temp -= k1 - 1;
      } else
        temp = 0;
    }
    for (int i = 0; i < a2; i += 1) {
      if (temp >= k2 - 1) {
        temp -= k2 - 1;
      } else
        temp = 0;
    }
    ans1 = temp;
    temp = n;
    for (int i = 0; i < a2; i += 1) {
      if (temp >= k2) {
        ans2++;
        temp -= k2;
      } else
        temp = 0;
    }
    for (int i = 0; i < a1; i += 1) {
      if (temp >= k1) {
        ans2++;
        temp -= k1;
      } else
        temp = 0;
    }
  }
  cout << ans1 << " " << ans2 << endl;
}
