#include <bits/stdc++.h>
using namespace std;
const long long N = 3456789;
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  long long R, C, q, x, y;
  cin >> R >> C >> q >> x >> y;
  x--;
  y--;
  vector<vector<long long> > grid(R);
  for (long long i = 0; i < R; i++)
    for (long long j = 0; j < C; j++) grid[i].push_back(0);
  if (R == 1) {
    long long rem = q % C;
    long long asked = q / C;
    for (long long i = 0; i < C; i++) grid[0][i] = asked;
    for (long long i = 0; i < C && rem > 0; i++) {
      grid[0][i]++;
      rem--;
    }
    long long mini = LONG_LONG_MAX, maxi = LONG_LONG_MIN;
    for (long long i = 0; i < C; i++) {
      mini = min(mini, grid[0][i]);
      maxi = max(maxi, grid[0][i]);
    }
    cout << maxi << " " << mini << " " << grid[x][y] << '\n';
    return 0;
  }
  if (R == 2) {
    long long rem = q % (2 * C);
    long long asked = q / (2 * C);
    for (long long i = 0; i < 2; i++)
      for (long long j = 0; j < C; j++) grid[i][j] = asked;
    for (long long i = 0; i < R && rem > 0; i++)
      for (long long j = 0; j < C && rem > 0; j++) {
        grid[i][j]++;
        rem--;
      }
    long long mini = LONG_LONG_MAX, maxi = LONG_LONG_MIN;
    for (long long i = 0; i < R; i++) {
      for (long long j = 0; j < C; j++) {
        mini = min(mini, grid[i][j]);
        maxi = max(maxi, grid[i][j]);
      }
    }
    cout << maxi << " " << mini << " " << grid[x][y] << '\n';
    return 0;
  }
  long long rem = q % (R * C + (R - 2) * C);
  long long each = q / (R * C + (R - 2) * C);
  for (long long i = 0; i < R; i++) {
    for (long long j = 0; j < C; j++) {
      if (i == 0 || i == R - 1)
        grid[i][j] = each;
      else
        grid[i][j] = 2 * each;
    }
  }
  for (long long i = 0; i < R && rem > 0; i++)
    for (long long j = 0; j < C && rem > 0; j++) {
      grid[i][j]++;
      rem--;
    }
  for (long long i = R - 2; i > 0 && rem > 0; i--)
    for (long long j = 0; j < C && rem > 0; j++) {
      grid[i][j]++;
      rem--;
    }
  long long mini = LONG_LONG_MAX, maxi = LONG_LONG_MIN;
  for (long long i = 0; i < R; i++) {
    for (long long j = 0; j < C; j++) {
      mini = min(mini, grid[i][j]);
      maxi = max(maxi, grid[i][j]);
    }
  }
  cout << maxi << " " << mini << " " << grid[x][y] << '\n';
  return 0;
}
