#include <bits/stdc++.h>
using namespace std;
const int len = 2e5 + 5;
const long long mod = 998244353;
const unsigned long long seed = 131;
long long dd[300][300];
int main() {
  long long n, m, k, x, y;
  cin >> n >> m >> k >> x >> y;
  if (n == 1) {
    long long ans = k / m;
    k %= m;
    if (k == 0)
      cout << ans << ' ' << ans << ' ' << ans << endl;
    else {
      cout << ans + 1 << ' ' << ans << ' ';
      if (k >= y)
        cout << ans + 1 << endl;
      else
        cout << ans << endl;
    }
    return 0;
  }
  long long t = (2 * n - 2) * m;
  long long minx = k / t, maxx = k / t * 2;
  for (int i = 1; i <= n; ++i)
    for (int j = 1; j <= m; ++j) {
      if (i == 1 || i == n)
        dd[i][j] = minx;
      else
        dd[i][j] = maxx;
    }
  k %= t;
  for (int i = 1; i <= n; ++i)
    for (int j = 1; j <= m; ++j) {
      if (k)
        dd[i][j]++, k--;
      else
        break;
    }
  for (int i = n - 1; i >= 2; --i)
    for (int j = 1; j <= m; ++j) {
      if (k)
        dd[i][j]++, k--;
      else
        break;
    }
  long long ans1 = 0, ans2 = 1e18;
  for (int i = 1; i <= n; ++i)
    for (int j = 1; j <= m; ++j) {
      ans1 = max(ans1, dd[i][j]);
      ans2 = min(ans2, dd[i][j]);
    }
  cout << ans1 << ' ' << ans2 << ' ' << dd[x][y];
}
