#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ld = long double;
using ull = unsigned long long;
const double PI = acos(-1.0);
const long long EPS = (1e-10);
const long long N = 1e5 * 2 + 10;
const long long inf = 1e9 * 2 + 10;
const ll INF = 1e18 * 2 + 10;
const long long MOD = 1e9 + 7;
long long nxt() {
  long long x;
  cin >> x;
  return x;
}
long long fcmp(double a, double b) {
  return (fabs(a - b) < EPS ? 0 : a > b ? 1 : -1);
}
ll k, n, m;
long long f(long long x, long long y) {
  if (n == 1) {
    return k / m + (k % m >= y);
  }
  long long c = 2 * m * n - 2 * m;
  long long pos = (x - 1) * m + y;
  long long div = k / c, rem = k % c;
  if (x == 1 || x == n)
    return (div + (rem >= pos));
  else {
    return (2 * div + (rem >= pos) + (rem >= n * m + ((n - x - 1) * m + y)));
  }
}
long long x, y;
int32_t main() {
  ios_base::sync_with_stdio(false);
  cin.tie(nullptr);
  cin >> n >> m >> k >> x >> y;
  cout << max({f(1, 1), f(2, 1), f(n - 1, 1)}) << " " << f(n, m) << " "
       << f(x, y);
  return 0;
}
