#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  int n, m, x, y;
  long long int k;
  cin >> n >> m >> k >> x >> y;
  if (n == 1) {
    if (k % m)
      cout << k / m + 1;
    else
      cout << k / m;
    cout << " " << k / m << " ";
    if (y <= k % m)
      cout << k / m + 1;
    else
      cout << k / m;
    return 0;
  }
  if (n == 2) {
    if (k % (2 * m))
      cout << k / (2 * m) + 1;
    else
      cout << k / (2 * m);
    cout << " " << k / (2 * m) << " ";
    if (k % (2 * m) < (x - 1) * 2 + y)
      cout << k / (2 * m);
    else
      cout << k / (2 * m) + 1;
    return 0;
  }
  long long int tmp, rem;
  tmp = k / ((n - 1) * m);
  rem = k % ((n - 1) * m);
  if (tmp) {
    if (rem > m)
      cout << tmp + 1 << " ";
    else
      cout << tmp << " ";
  } else {
    cout << "1 ";
  }
  if (tmp % 2) {
    if (rem >= m)
      cout << (tmp + 1) / 2 << " ";
    else
      cout << (tmp - 1) / 2 << " ";
    if (x == 1)
      cout << (tmp + 1) / 2;
    else if (x == n) {
      if (y > rem)
        cout << (tmp - 1) / 2;
      else
        cout << (tmp + 1) / 2;
    } else {
      if (rem / m > (n - x))
        cout << tmp + 1;
      else if (rem / m == (n - x) && rem % m >= y)
        cout << tmp + 1;
      else
        cout << tmp;
    }
  } else {
    cout << tmp / 2 << " ";
    if (x == n)
      cout << tmp / 2;
    else if (x == 1) {
      if (y > rem)
        cout << tmp / 2;
      else
        cout << tmp / 2 + 1;
    } else {
      if (rem / m > x - 1)
        cout << tmp + 1;
      else if (rem / m == x - 1 && rem % m >= y)
        cout << tmp + 1;
      else
        cout << tmp;
    }
  }
  return 0;
}
