#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, m, x, y;
  long long k;
  cin >> n >> m >> k >> x >> y;
  if (n == 1) {
    long long num = n * m;
    long long a = k / num;
    if (k % num == 0) {
      cout << a << " " << a << " " << a << endl;
    } else {
      cout << a + 1 << " " << a << " ";
      if (k % num < y)
        cout << a << endl;
      else
        cout << a + 1 << endl;
    }
  } else if (n == 2) {
    long long num = n * m;
    long long a = k / num;
    if (k % num == 0) {
      cout << a << " " << a << " " << a << endl;
    } else {
      cout << a + 1 << " " << a << " ";
      int r = k % num / m;
      if (k % num != r * m) r += 1;
      int l = k % num % m;
      if (l == 0) l = 5;
      if (r > x)
        a += 1;
      else if (r == x && y <= l)
        a += 1;
      cout << a << endl;
    }
  } else {
    long long num = (n * 2 - 2) * m;
    long long a = k / num * 2;
    long long b = k / num, c;
    if (x == n || x == 1)
      c = b;
    else
      c = a;
    if (k % num == 0)
      cout << a << " " << b << " " << c << endl;
    else {
      int r = k % num / m;
      if (k % num != r * m) r += 1;
      int l = k % num % m;
      if (l == 0) l = m;
      if (r == 1) {
        if (a == 0) a += 1;
        if (x == 1 && y <= l) c += 1;
        cout << a << " " << b << " " << c << endl;
      } else if (r <= n) {
        a += 1;
        if (r == n && l == m) b += 1;
        if (r > x)
          c += 1;
        else if (r == x && y <= l)
          c += 1;
        cout << a << " " << b << " " << c << endl;
      } else {
        a += 2;
        b += 1;
        c += 1;
        if (x == n)
          c = c;
        else if (r > 2 * n - x)
          c += 1;
        else if (r == 2 * n - x && y <= l)
          c += 1;
        cout << a << " " << b << " " << c << endl;
      }
    }
  }
  return 0;
}
