#include <bits/stdc++.h>
using namespace std;
long long n, m, x, y, a, b, times, red, t3;
long long k;
void work3() {
  long long t1, t2;
  if (red == 0) {
    times--;
    red = m * 2 * (n - 1);
  }
  if (x != 1 && x != n)
    t3 = 2 * times;
  else
    t3 = times;
  if (red > n * m) {
    t3++;
    red -= n * m;
    a = red / m;
    b = red % m;
    if (b != 0)
      a++;
    else
      b = m;
    if (n - a == x) {
      if (y <= b) t3 += 1;
    } else if (n - a < x) {
      if (x != n) t3 += 1;
    }
    t1 = (times + 1) * 2;
    t2 = times + 1;
  } else {
    a = red / m;
    b = red % m;
    if (b != 0)
      a++;
    else
      b = m;
    if (a == x) {
      if (y <= b)
        t3 += 1;
      else
        t3 += 0;
    } else if (a > x)
      t3 += 1;
    if (a > 1) {
      t1 = times * 2 + 1;
      if (a < n || (a == n && b != m))
        t2 = times;
      else
        t2 = times + 1;
    } else {
      t1 = times * 2;
      if (t1 == 0) t1++;
      t2 = times;
    }
  }
  cout << t1 << " " << t2 << " " << t3 << endl;
}
int main() {
  cin >> n >> m >> k >> x >> y;
  if (n > 2) {
    times = k / (m * 2 * (n - 1));
    red = k % (m * 2 * (n - 1));
    work3();
  } else if (n == 1) {
    long long t2;
    times = k / (n * m);
    red = k % (n * m);
    if (red == 0) {
      red = n * m;
      times--;
    }
    if (y <= red)
      t3 = times + 1;
    else
      t3 = times;
    if (red == m)
      t2 = times + 1;
    else
      t2 = times;
    cout << times + 1 << " " << t2 << " " << t3 << endl;
  } else if (n == 2) {
    long long t2;
    times = k / (n * m);
    red = k % (n * m);
    if (red == 0) {
      red = n * m;
      times--;
    }
    a = red / m;
    b = red % m;
    if (b != 0)
      a++;
    else
      b = m;
    if (x > a) {
      t3 = times;
    } else if (x == a) {
      if (y <= b)
        t3 = times + 1;
      else
        t3 = times;
    } else if (x < a) {
      t3 = times + 1;
    }
    if (a == n && b == m)
      t2 = times + 1;
    else
      t2 = times;
    cout << times + 1 << " " << t2 << " " << t3 << endl;
  }
  return 0;
}
