#include <bits/stdc++.h>
using namespace std;
int main() {
  int a1, a2, k1, k2, n;
  cin >> a1 >> a2 >> k1 >> k2 >> n;
  if (k1 > k2) {
    swap(a1, a2);
    swap(k1, k2);
  }
  cout << max(0, n - ((k1 - 1) * a1 + (k2 - 1) * a2));
  cout << " " << min(n / k1, a1) + min(a2, (n - (min(n / k1, a1) * k1)) / k2);
}
