#include <bits/stdc++.h>
using namespace std;
int dx[] = {+1, -1, 0, 0};
int dy[] = {0, 0, +1, -1};
int dx2[] = {+1, -1, 0, 0, +1, +1, -1, -1};
int dy2[] = {0, 0, +1, -1, +1, -1, -1, +1};
long long squ(long long x) { return (x * x); }
long long power(long long bs, long long k) {
  long long x = 1, y = bs;
  if (k == 0) return 1;
  while (k > 0) {
    if (k % 2 == 1) x = (x * y);
    y *= y;
    k /= 2;
  }
  return (x);
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  ;
  cout.unsetf(ios::floatfield);
  cout.precision(6);
  cout.setf(ios::fixed, ios::floatfield);
  ;
  long long n, i, j, m, x, y, mn = 0, mx = 0, sr = 0, dv, k;
  cin >> n >> m >> k >> x >> y;
  if (n == 1) {
    if (k % m == 0)
      mn = k / m, mx = k / m, sr = k / m;
    else {
      mn = k / m;
      mx = (k / m) + 1;
      sr = mn;
      k -= (m * mn);
      if (k >= y) sr++;
    }
    cout << mx << ' ' << mn << ' ' << sr;
    return 0;
  }
  if (k < (n * m)) {
    long long rw, cl;
    rw = (k / m);
    if (k % m) rw++;
    k -= ((rw - 1) * m);
    cl = k;
    if (x < rw)
      sr++;
    else if (x == rw) {
      if (cl >= y) sr++;
    }
    mn = 0;
    mx = 1;
    cout << mx << ' ' << mn << ' ' << sr;
    return 0;
  }
  if (k == (n * m)) {
    cout << mx + 1 << ' ' << mn + 1 << ' ' << sr + 1;
    return 0;
  }
  if (n == 2) {
    long long rw, cl;
    mx = k / (n * m), mn = mx, sr = mn;
    if (k % (n * m)) {
      k -= (n * m * mx);
      if (k > m)
        rw = 2;
      else
        rw = 1;
      mx++;
      cl = (k % m);
      if (rw > x)
        sr++;
      else if (rw == x) {
        if (cl >= y) sr++;
      }
    }
    cout << mx << ' ' << mn << ' ' << sr;
    return 0;
  }
  k -= (n * m);
  mx++, mn++, sr++;
  dv = k / ((n - 1) * m);
  mn += (dv / 2);
  mx += dv;
  k -= (dv * (n - 1) * m);
  if (x != 1 && x != n)
    sr += dv;
  else if (x == 1 || x == n)
    sr += (dv / 2);
  if (k % ((n - 1) * m) != 0) mx++;
  long long nw;
  if (dv % 2 == 1) {
    nw = 1;
  } else
    nw = n;
  long long rw, cl;
  rw = (k / m);
  if (k % m) rw++;
  k -= ((rw - 1) * m);
  cl = k;
  if (nw == 1) {
    if (nw + rw > x)
      sr++;
    else if (nw + rw == x) {
      if (cl >= y) sr++;
    }
  } else {
    if (nw - rw < x && x != n)
      sr++;
    else if (nw - rw == x && x != n) {
      if (cl >= y) sr++;
    }
  }
  cout << mx << ' ' << mn << ' ' << sr;
  return 0;
}
