On the Literature lesson Sergei noticed an awful injustice, it seems that some students are asked more often than others.

Seating in the class looks like a rectangle, where n rows with m pupils in each. 

The teacher asks pupils in the following order: at first, she asks all pupils from the first row in the order of their seating, then she continues to ask pupils from the next row. If the teacher asked the last row, then the direction of the poll changes, it means that she asks the previous row. The order of asking the rows looks as follows: the 1-st row, the 2-nd row, ..., the n - 1-st row, the n-th row, the n - 1-st row, ..., the 2-nd row, the 1-st row, the 2-nd row, ...

The order of asking of pupils on the same row is always the same: the 1-st pupil, the 2-nd pupil, ..., the m-th pupil.

During the lesson the teacher managed to ask exactly k questions from pupils in order described above. Sergei seats on the x-th row, on the y-th place in the row. Sergei decided to prove to the teacher that pupils are asked irregularly, help him count three values:  the maximum number of questions a particular pupil is asked,  the minimum number of questions a particular pupil is asked,  how many times the teacher asked Sergei. 

If there is only one row in the class, then the teacher always asks children from this row.


-----Input-----

The first and the only line contains five integers n, m, k, x and y (1 ≤ n, m ≤ 100, 1 ≤ k ≤ 10^18, 1 ≤ x ≤ n, 1 ≤ y ≤ m).


-----Output-----

Print three integers:  the maximum number of questions a particular pupil is asked,  the minimum number of questions a particular pupil is asked,  how many times the teacher asked Sergei. 


-----Examples-----
Input
1 3 8 1 1

Output
3 2 3
Input
4 2 9 4 2

Output
2 1 1
Input
5 5 25 4 3

Output
1 1 1
Input
100 100 1000000000000000000 100 100

Output
101010101010101 50505050505051 50505050505051


-----Note-----

The order of asking pupils in the first test:   the pupil from the first row who seats at the first table, it means it is Sergei;  the pupil from the first row who seats at the second table;  the pupil from the first row who seats at the third table;  the pupil from the first row who seats at the first table, it means it is Sergei;  the pupil from the first row who seats at the second table;  the pupil from the first row who seats at the third table;  the pupil from the first row who seats at the first table, it means it is Sergei;  the pupil from the first row who seats at the second table; 

The order of asking pupils in the second test:   the pupil from the first row who seats at the first table;  the pupil from the first row who seats at the second table;  the pupil from the second row who seats at the first table;  the pupil from the second row who seats at the second table;  the pupil from the third row who seats at the first table;  the pupil from the third row who seats at the second table;  the pupil from the fourth row who seats at the first table;  the pupil from the fourth row who seats at the second table, it means it is Sergei;  the pupil from the third row who seats at the first table;

Difficulty: interview

Starter code:

Solutions:
n, m, k, x, y = list(map(int, input().split()))

ans = [[0] * m for x in range(n)]

onebig = (2*n-2)*m or m

oo = k // onebig

for i in range(n):
    for j in range(m):
        if i == 0 or i == n-1:
            ans[i][j] += oo
            k -= oo
        else:
            ans[i][j] += 2*oo
            k -= 2*oo

from itertools import chain

for i in chain(list(range(n)), list(range(n-2, 0, -1))):
    if not k:
        break
    for j in range(m):
        if not k:
            break
        ans[i][j] += 1
        k -= 1

_max = max(list(map(max, ans)))
_min = min(list(map(min, ans)))
_ans = ans[x-1][y-1]


print(_max, _min, _ans)


n,m,k,x,y = map(int,input().split())

arr = [[0 for i in range(m)] for j in range(n)]

if(n==1):
    loop = k//m
    for i in range(m):
        arr[0][i] += loop
    rest = k%m

    i = 0
    j = 0
    while(rest>0):
        arr[i][j] += 1
        j += 1
        if(j==m):
            i += 1
            j = 0
        rest -= 1

    print(max(arr[0]), min(arr[0]), arr[x-1][y-1])
    return

loop = k//((n*2-2)*m)

for i in range(m):
    arr[0][i] += loop
    for j in range(1, n-1):
        arr[j][i] += loop*2
    arr[n-1][i] += loop

rest = k%((n*2-2)*m)


i = 0
j = 0
while(rest>0):
    arr[i][j] += 1
    rest -= 1
    j += 1
    if(j==m):
        j = 0
        i += 1
        if(i==n):
            break

i = n-2
j = 0
while(rest>0):
    arr[i][j] += 1
    rest -= 1
    j += 1
    if(j==m):
        j = 0
        i -= 1

mx = 0
mn = 100000000000000000000000
for i in range(n):
    mx = max(mx, max(arr[i]))
    mn = min(mn, min(arr[i]))


print(mx, mn, arr[x-1][y-1])

n, m, k, x, y = list(map(int, input().split()))
x -= 1
y -= 1
if n == 1:
	print((k + m - 1) // m, k // m, k // m + (k % m > y))
else:
	cnt = m * (n + n - 2)
	k -= 1
	c = [[k // cnt * (1 + (0 < i < n - 1)) + (k % cnt >= i * m + j) + (0 < i < n - 1) * (k % cnt >= n * m + (n - i - 2) * m + j) for j in range(m)] for i in range(n)]
	print(max([max(c[i]) for i in range(n)]), min([min(c[i]) for i in range(n)]), c[x][y])



def sv(N, M, K, X, Y):
	X -= 1
	Y -= 1
	if N > 1:
		rounds = K // ((N-1)*M)
		rem = K % ((N-1)*M)
		gd = [[0]*M for n in range(N)]
		for m in range(0, M):
			gd[0][m] = (rounds+1) // 2
			gd[N-1][m] = rounds // 2
		for n in range(1, N-1):
			for m in range(0, M):
				gd[n][m] = rounds
		if rounds % 2 == 1:
			for n in range(N-1, -1, -1):
				if not rem: break
				for m in range(0, M):
					if not rem: break
					rem -= 1
					gd[n][m] += 1
		else:
			for n in range(0, N):
				if not rem: break
				for m in range(0, M):
					if not rem: break
					rem -= 1
					gd[n][m] += 1
	else:
		rounds = K // M
		rem = K % M
		gd = [[rounds]*M]
		for m in range(rem):
			gd[0][m] += 1
	a1 = max(max(x) for x in gd)
	a2 = min(min(x) for x in gd)
	a3 = gd[X][Y]
	print(a1, a2, a3)
N, M, K, X, Y = list(map(int, input().split()))
sv(N, M, K, X, Y)


R, C, k, x, y = list(map(int, input().split()))

grid = [[0 for _ in range(C)] for _ in range(R)]

total_in_sweep = R * C + max(R-2, 0) * C
alloc = k // total_in_sweep

for r in range(R):
    for c in range(C):
        grid[r][c] = alloc * (1 if r == 0 or r == R-1 else 2)

k -= alloc * total_in_sweep
r = 0
c = 0

for r in range(R):
    if k <= 0: break
    for c in range(C):
        if k <= 0: break
        k -= 1
        grid[r][c] += 1

for r in range(R-2, -1, -1):
    if k <= 0: break
    for c in range(C):
        if k <= 0: break
        k -= 1
        grid[r][c] += 1

a = max(list(map(max, grid)))
b = min(list(map(min, grid)))
c = grid[x-1][y-1]

print("%d %d %d" % (a, b, c))


n, m, k, x, y = list(map(int, input().split()))
prohod = (2 * n - 2) * m
if n == 1:
    prohod = m
last = k % prohod
minimum = k // prohod
maximum = (k // prohod) * 2
line = []
a1 = 10000000000000000000000000
a2 = -10000000000000000000000000
for i in range(n):
    if i == 0 or i == n-1:
        line += [minimum]
    else:
        line += [maximum]
ask = True
for i in range(n):
    if (last >= m):
        last -= m
        line[i] += 1
    else:
        if (last > 0):
            if (i == x - 1 and last < y):
                ask = False            
            line[i] += 1
            a1 = min(a1, line[i] - 1) 
            a2 = max(a2, line[i])
            last = 0
        else:
            a1 = min(a1, line[i]) 
            a2 = max(a2, line[i])            
    a2 = max(a2, line[i]) 
    a1 = min(a1, line[i])     
i = n - 2
while i > 0:
    if (last >= m):
        last -= m
        line[i] += 1
    else:
        if (last > 0):
            if (i == x - 1 and last < y):
                ask = False            
            line[i] += 1
            a1 = min(a1, line[i] - 1) 
            a2 = max(a2, line[i])  
            last = 0
        else:
            a1 = min(a1, line[i]) 
            a2 = max(a2, line[i])             
        break
    a2 = max(a2, line[i]) 
    a1 = min(a1, line[i]) 
    i -= 1
a3 = line[x - 1]
if not ask:
    a3 -= 1
print(a2, a1, a3)


n, m, k, x, y = list(map(int, input().split()))

rw = [0] * n
pl = [[0] * m for r in range(n)]

def call():
    nonlocal k, rw, pl
    if n == 1:

        a, b = k // m, k % m;

        for i in range(m):
            pl[0][i] = a

        for i in range(b):
            pl[0][i] += 1

        return

    if k >= 30000:
        ite = 2 * m * (n-1)
        t = k // ite
        for i in range(n):
            rw[i] += 2 * t;

        rw[0] -= t
        rw[-1] -= t

        k -= t * ite


    act = 0
    up = 1
    while 1:
        if k > m:
            rw[act] += 1

            if up:
                act += 1
            else:
                act -= 1

            if act == n:
                act = n - 2
                up = 0

            if act == -1:
                act = 1
                up = 1

            k -= m

        else:
            for i in range(k):
                pl[act][i] += 1
            return

call()

for i in range(n):
    for j in range(m):
        pl[i][j] += rw[i]

mxges = max([max(pl[i]) for i in range(n)])
mnges = min([min(pl[i]) for i in range(n)])
gg = pl[x-1][y-1]

print("{} {} {}".format(mxges, mnges, gg))


n, m, k, x, y = map(int, input().split())
if k < n * m:
    print('1 0', end=' ')
    if (x - 1) * m + y - 1 >= k:
        print(0)
    else:
        print(1)
else:
    a = 1
    if n != 1:
        k -= n * m
        a += k // (2 * (n - 1) * m) * 2
        k = k % (2 * (n - 1) * m)
        our = [[0] * m for i in range(n)]
        for i in range(m):
            our[0][i] = a // 2 + 1
            our[-1][i] = a // 2 + 1
        for i in range(1, n - 1):
            for j in range(m):
                our[i][j] = a
        curr_i = n - 2
        curr_j = -1
        diff = -1
        while k > 0:
            k -= 1
            curr_j += 1
            if curr_j == m:
                curr_j = 0
                curr_i += diff
                if curr_i == -1:
                    curr_i += 2
                    diff = 1
                elif curr_i == n:
                    curr_i -= 2
                    diff = -1
            our[curr_i][curr_j] += 1
        ma = 0
        mi = 10 ** 300
        for elem in our:
            ma = max(ma, max(elem))
            mi = min(mi, min(elem))
        print(ma, mi, our[x - 1][y - 1])
    else:
        a = k // m
        k %= m
        if k == 0:
            print(a, a, a)
        else:
            print(a + 1, a, a + (1 if y <= k else 0))
    



n, m, k, x, y = list(map(int, input().split()))

if n != 1:
    full_rounds = k // (2 * (n - 2) * m + 2 * m)

    #print(full_rounds)
    #print(2 * full_rounds)

    k %= (2 * (n - 2) * m + 2 * m)

    A = [[0 for j in range(m)] for i in range(n)]

    row = 0
    col = 0

    while k != 0 and row < n and col < m:
        #print(str(row) + " " + str(col))
        A[row][col] += 1
        k -= 1
        col += 1
        if col == m:
            row += 1
            col = 0

    row = n - 2
    col = 0
    while k != 0:
        #print(str(row) + " " + str(col))
        A[row][col] += 1
        k -= 1
        col += 1
        if col == m:
            row -= 1
            col = 0

    small = 10**18
    big = 0

    if x == n or x == 1:
        serg = full_rounds + A[x - 1][y - 1]
    else:
        serg = 2 * full_rounds + A[x - 1][y - 1]

    for row in A[1:-1]:
        small = min([small] + [2 * full_rounds + a for a in row])
        big = max([big] + [2 * full_rounds + a for a in row])

    small = min([small] + [full_rounds + a for a in A[0]])
    big = max([big] + [full_rounds + a for a in A[0]])

    small = min([small] + [full_rounds + a for a in A[-1]])
    big = max([big] + [full_rounds + a for a in A[-1]])

    print(str(big) + " " + str(small) + " " + str(serg))

else:
    A = [k // m] * m
    k %= m
    i = 0
    while k != 0:
        A[i] += 1
        k -= 1
        i += 1

    small = 10**18
    big = 0

    serg = A[y - 1]
    small = min([small] + A)
    big = max([big] + A)

    print(str(big) + " " + str(small) + " " + str(serg))


def main():
    n, m, k, x, y = list(map(int, input().split()))
    A = [[0] * m for i in range(n)]
    MOD = (2 * n - 2) * m
    if n > 1:
        for i in range(m):
            A[0][i] += k // MOD
            A[-1][i] += k // MOD
        for i in range(1, n - 1):
            for j in range(m):
                A[i][j] += 2 * (k // MOD)
        k %= MOD
        for i in range(n):
            for j in range(m):
                if k > 0:
                    A[i][j] += 1
                    k -= 1
        for i in range(n - 2, -1, -1):
            for j in range(m):
                if k > 0:
                    A[i][j] += 1
                    k -= 1
    else:
        MOD = m
        for i in range(m):
            A[0][i] = k // MOD
        k %= MOD
        for i in range(m):
            if k > 0:
                A[0][i] += 1
                k -= 1
    maxx = -1
    minn = 10 ** 100
    for row in A:
        maxx = max(maxx, max(row))
        minn = min(minn, min(row))
    print(maxx, minn, A[x - 1][y - 1])        
    
    
main()


n, m, k, x, y = [int(x) for x in input().split()]
maxi = 0
mini = 0
ser = 0
if (n == 1):
    if (k % m == 0):
        maxi = k // m
        mini = k // m
        ser = k // m
    else:
        maxi = k // m + 1
        mini = k // m
        if (y <= (k % m)):
            ser = maxi
        else:
            ser = mini
    print(maxi, mini, ser)
    return
if (n == 2):
    if (k % (2 * m) == 0):
        maxi = k // (2 * m)
        mini = k // (2 * m)
        ser = k // (2 * m)
    else:
        maxi = k // (2 * m) + 1
        mini = k // (2 * m)
        if ((x - 1) * m + y <= (k % (2 * m))):
            ser = maxi
        else:
            ser = mini
    print(maxi, mini, ser)
    return
if (k < (2 * n - 2) * m):
    if (k < n * m):
        maxi = 1
        mini = 0
        if ((x - 1) * m + y <= k):
            ser = 1
        else:
            ser = 0
    elif (k == n * m):
        maxi = 1
        mini = 1
        ser = 1
    else:
        maxi = 2
        mini = 1
        if ((x == 1) or (x == n)):
            ser = 1
        else:
            if (k - n * m >= y + (n - 1 - x) * m):
                ser = 2
            else:
                ser = 1
    print(maxi, mini, ser)
else:
    mini = k // ((2 * n - 2) * m)
    maxi = 2 * mini
    if (k % ((2 * n - 2) * m) > m):
        if (k % ((2 * n - 2) * m) > m * n):
            maxi += 2
            mini += 1
        else:
            maxi += 1
        if (k % ((2 * n - 2) * m) == m * n):
            mini += 1
    if (x == 1):
        ser = k // ((2 * n - 2) * m)
        if (k % ((2 * n - 2) * m) >= y):
            ser += 1
    elif (x == n):
        ser = k // ((2 * n - 2) * m)
        if (k % ((2 * n - 2) * m) >= y + (n - 1) * m):
            ser += 1
    else:
        if (k % ((2 * n - 2) * m) <= n * m):
            if ((x - 1) * m + y <= k % ((2 * n - 2) * m)):
                ser = (k // ((2 * n - 2) * m)) * 2 + 1
            else:
                ser = (k // ((2 * n - 2) * m)) * 2
        else:
            ser = (k // ((2 * n - 2) * m)) * 2 + 1
            if (k % ((2 * n - 2) * m) - n * m >= (n - 1 - x) * m + y):
                ser += 1
    print(maxi, mini, ser)



n,m,k,x,y = map(int, input().split(" "))


def s(row, col):
	ret = 0
	if (l % 2 == 0):
		if(row == n or row == 1):
			ret = l//2
		else:
			ret = l
		if (rl >= row or (rl+1 == row and col <= rr)):
			ret += 1
	else:
		if(row == n):
			ret = (l-1)//2
		elif (row == 1):
			ret = (l+1)//2
		else:
			ret = l
		if (n-rl<row or (n-rl==row and col <= rr)):
			ret += 1
	return ret

if n == 1:
	# 总共完成的行数
	r = k // m

	# 最后一行（未完成）剩下
	rr = k % m

	if (rr > 0):
		maxi = r+1
	else:
		maxi = r
	mini = r
	if y <= rr:
		sergei = r + 1
	else:
		sergei = r
else:
	# 总共完成的行数
	r = k // m

	# 最后一行（未完成）剩下
	rr = k % m

	# 总共轮数：
	l = r // (n-1)

	# 最后一轮完成的行数
	rl = r % (n-1)

	if l % 2 == 0:
		maxi = max(s(2, 1),s(1, 1))
		mini = s(n, 1)
	else:
		maxi = max(s(n-1, 1), s(1,1))
		mini = s(n, m)
	sergei = s(x, y)

# print(r,rr,l,rl)
# print(s(1,1))
print(maxi, mini, sergei)

n, m, k, x, y = list(map(int, input().split()))
if n == 1:
    t = m
elif m == 1:
    t = n + n - 2
else:
    t = n * m + (n - 2) * m

ma = -1
mi = 10 ** 30

a = [[0] * m for i in range(n)]
for i in range(n):
    for j in range(m):
        a[i][j] = k // t
        if i != 0 and i != n - 1:
            a[i][j] *= 2
k = k % t
for i in range(n):
    for j in range(m):
        if k > 0:
            a[i][j] += 1
            k -= 1
            
for i in range(n - 2, -1, -1):
    for j in range(m):
        if k > 0:
            a[i][j] += 1
            k -= 1
            
for i in range(n):
    for j in range(m):
        ma = max(ma, a[i][j])
        mi = min(mi, a[i][j])
print(ma, mi, a[x - 1][y - 1])



import sys

n, m, k, x, y = map(int, input().split())

if n == 1:
    max_q = k // m + (k % m != 0)
    min_q = k // m
    serg_q = k // m + (y <= k % m)
    pass
else:
    num_q = [[0] * m for i in range(n)]

    loop = k // ((2 * n - 2) * m)

    for i in range(n):
        for j in range(m):
            if i == 0 or i == n - 1:
                num_q[i][j] = loop
            else:
                num_q[i][j] = 2 * loop

    amari = k % ((2 * n - 2) * m)
    zenhan = min((n - 1) * m, amari)
    kouhan = max(amari - (n - 1) * m, 0)

    for i in range(zenhan):
        num_q[i // m][i % m] += 1

    for i in range(kouhan):
        num_q[(n - 1) - (i // m)][i % m] += 1

    max_q = -1
    min_q = float('inf')

    for i in range(n):
        max_q = max(max_q, max(num_q[i]))
        min_q = min(min_q, min(num_q[i]))

    serg_q = num_q[x - 1][y - 1]

    pass
# print(num_q)

print(max_q, min_q, serg_q)

n, m, k, x1, y1 = map(int, input().split())
c = 0
if (n == 1):
    mi = k // m
    ma = mi + 1 * int(k % m != 0)
    s = mi + 1 * int(k % m > y1 - 1)
else:
    c = k // (m * (2 * n - 2))
    d = k % (m * (2 * n - 2))
    q = [[0 for i in range(m)] for j in range(n)]
    for i in range(n):
        for j in range(m):
            if 0 < i < n - 1:
                q[i][j] = 2 * c
            else:
                q[i][j] = c
    i = 0
    while d > 0:
        if i % (2 * n - 2) > n - 1:
            x = 2 * n - 2 - (i % (2 * n - 2))
        else:
            x = i % (2 * n - 2)
        j = 0
        while d > 0 and j < m:
            q[x][j] += 1
            d -= 1
            j += 1
        i += 1
    ma = -1
    mi = 10 ** 100
    for i in range(n):
        for j in range(m):
            mi = min(q[i][j], mi)
            ma = max(q[i][j], ma)
    s = q[x1 - 1][y1 - 1]
print(ma, mi, s)

n, m, k, x, y = list(map(int, input().split()))

if n == 1:
  cnt = k // m
  k %= m
else:
  cnt = k // (2 * m * (n - 1)) 
  k %= 2 * m * (n - 1)

q = [[2 * cnt] * m for i in range(n)]
q[0] = [cnt] * m
q[-1] = [cnt] * m

i = 0
j = 0
d = 1
while k > 0:
  q[i][j] += 1
  
  k -= 1
  j += 1
  if d == 1:
    i += j // m
    j %= m
  elif d == -1:
    i -= j // m
    j %= m
  
  if i == n:
    i = n - 2
    d = -1

gmin = 10**18
gmax = 0
for line in q:
  gmin = min(gmin, min(line))
  gmax = max(gmax, max(line))
print(gmax, gmin, q[x - 1][y - 1])


n,m,k,x,y=[int(x) for x in input().split()]
ma=0
mi=0
minn=199999999999999999
maxx=-1
if n is 1:
    mi=k//m
    ma=mi
    k=k%m
    a=[0]*m
    for p in range (m):
        if k is 0:
            break
        a[p]=1
        k-=1
    for p in range(m):
        if a[p]>maxx:
            maxx=a[p]
        if a[p]<minn:
            minn=a[p]
    print(ma+maxx,mi+minn,mi+a[y-1])
else:
    i=(2*n-2)*m
    mi=k//i
    if n>2:
        ma=mi*2
    else:
        ma=mi
    k=k%i
    a = [[0 for p in range(m)] for q in range(n)]
    for p in range(n):
        for q in range(m):
            if p is 0 or p is n-1:
                a[p][q]=mi
            else:
                a[p][q]=ma
    for p in range(n):
        if k is 0:
            break
        for q in range(m):
            if k is 0:
                break
            a[p][q]+=1
            k-=1
    for p in range(n):
        if k is 0:
            break
        for q in range(m):
            if k is 0:
                break
            a[n-2-p][q]+=1
            k-=1
    for p in range(n):
        for q in range(m):
            if a[p][q]>maxx:
                maxx=a[p][q]
            if a[p][q]<minn:
                minn=a[p][q]
    if x is 1 or x is n:
        print(maxx,minn,a[x-1][y-1])
    else:
        print(maxx,minn,a[x-1][y-1])


n, m, k, x, y = map(int, input().split())
matrix = [[0] * m for i in range(n)]
in_cycle = (n + n - 2) * m
if n == 1:
    in_cycle = m
    for i in range(m):
        matrix[0][i] += k // in_cycle
    k %= in_cycle
    for i in range(m):
        if k > 0:
            matrix[0][i] += 1
            k -= 1
    mx = -1
    mn = 10 ** 19
    for i in matrix:
        mx = max(mx, max(i))
        mn = min(mn, min(i))
    print(mx, mn, matrix[x - 1][y - 1])            
else:
    for i in range(m):
        matrix[0][i] += k // in_cycle
        matrix[-1][i] += k // in_cycle
    for i in range(1, n - 1):
        for j in range(m):
            matrix[i][j] += (k // in_cycle) * 2
    k %= in_cycle
    for i in range(n):
        for j in range(m):
            if k > 0:
                matrix[i][j] += 1
                k -= 1
    for i in range(n - 2, -1, -1):
        for j in range(m):
            if k > 0:
                matrix[i][j] += 1
                k -= 1
    mx = -1
    mn = 10 ** 19
    for i in matrix:
        mx = max(mx, max(i))
        mn = min(mn, min(i))
    print(mx, mn, matrix[x - 1][y - 1])

def main():
	n, m, k, x, y = map(int, input().split())
	x -= 1
	y -= 1

	if (n == 1):
		ever = [k // m for i in range(m)]
		k %= m
		for i in range(k):
			ever[i] += 1
		print(max(ever), min(ever), ever[y])
		return

	per_leng = m * (2 * n - 2)
	per_num = k // per_leng
	
	every_raw = [2 * per_num for i in range(n)]
	every_raw[0] -= per_num;
	if (every_raw[-1] == 2 * per_num):
		every_raw[-1] -= per_num
	k %= per_leng

	curr_raw = 0
	dire = 0
	while (k >= m):
		every_raw[curr_raw] += 1
		if (dire == 0):
			if (curr_raw + 1 < n):
				curr_raw += 1
			else:
				dire = 1
				curr_raw -= 1
		else:
			curr_raw -= 1

		k -= m



	if (k == 0):
		print(max(every_raw), min(every_raw), every_raw[x])
	else:
		spec = [every_raw[curr_raw] for i in range(m)]
		for i in range(k):
			spec[i] += 1
		all_arr = []
		for i in range(n):
			if (i != curr_raw):
				all_arr.append(every_raw[i])
			else:
				all_arr += spec
		print(max(all_arr), min(all_arr), end = " ")
		if (x == curr_raw):
			print(spec[y])
		else:
			print(every_raw[x])





main()

n, m, k, x, y = tuple(map(int, input().split()))

maxq = minq = sergeiq = 0
if n == 1:
	maxq = k // m
	if k % m > 0:
		maxq +=1
		minq = maxq - 1
		if y <= k % m:
			sergeiq = maxq
		else:
			sergeiq = minq
	else:
		minq = maxq
		sergeiq = minq
elif n == 2:
	maxq = minq = sergeiq = k // (2*m)
	if k % (2*m) > 0:
		maxq += 1
		if x == 1 and y <= k % (2*m):
			sergeiq += 1
		elif x == 2 and k % (2*m) >= y + m:
			sergeiq += 1
elif k < n * m:
	maxq = 1
	minq = 0
	if k / m >= x:
		sergeiq = 1
	elif k / m <= x-1:
		sergeiq = 0
	elif k % m >= y:
		sergeiq = 1
	else:
		sergeiq = 0
elif k == n*m:
	maxq = 1
	minq = 1
	sergeiq = 1
else:
	maxq = 2*(k // (m * 2 * (n-1)))
	minq = k // (m * 2 * (n-1))
	if x == 1 or x == n:
		sergeiq = minq
	else:
		sergeiq = maxq
	remainder = k % (m * 2* (n-1))
	if remainder > 0:
		if remainder <= m:
			if x == 1 and y <= remainder:
				sergeiq += 1
		elif remainder <= m * n:
			maxq += 1
			if x <= remainder / m:
				sergeiq += 1
			elif x-1 < remainder / m and remainder % m >= y:
				sergeiq += 1
			if remainder == m*n:
				minq += 1
		else:
			maxq += 2
			sergeiq += 1
			minq += 1
			if x != 1 and x != n:
				if (remainder - (n*m)) / m >= n-x:
					sergeiq += 1
				elif (remainder - (n*m)) / m > n-x-1 and (remainder - (n*m)) % m >= y:
					sergeiq += 1
print(str(maxq) + ' ' + str(minq) + ' ' + str(sergeiq))



n, m, k, x, y = list(map(int, input().split()))

t = m if n == 1 else n * m + (n - 2) * m

a = k // t
f = [[0] * 101 for _ in range(101)]

for i in range(1, n + 1):
    for j in range(1, m + 1):
        f[i][j] = a
        if i > 1 and i < n:
            f[i][j] += a

b = k % t
for i in range(1, n + 1):
    for j in range(1, m + 1):
        if b == 0:
            break
        f[i][j] += 1
        b -= 1
    if b == 0:
        break
for i in range(n - 1, 1, -1):
    for j in range(1, m + 1):
        if b == 0:
            break
        f[i][j] += 1
        b -= 1
    if b == 0:
        break

maxnum = max(f[1][1], f[2][1], f[n - 1][1])
minnum = f[n][m]
sergei = f[x][y]

print(maxnum, minnum, sergei)


n, m, k, y, x = map(int, input().split())

maxnum = 0
minnum = 0
sergei = 0

if n == 1:
    maxnum = k // m + (1 if k % m > 0 else 0)
    minnum = k // m
    sergei = maxnum if x <= k % m else minnum
elif n == 2:
    maxnum = k // (m * 2) + (1 if k % (m * 2) > 0 else 0)
    minnum = k // (m * 2)
    sergei = maxnum if (m * (y - 1) + x) <= k % (m * 2) else minnum
else:
    z = (n * 2 - 2) * m
    a = k // z
    b = k % z
    maxnum = a * 2 + (1 if b > n * m else 0)
    maxnum += 1 if a == 0 and b > 0 else 0
    maxnum += 1 if a > 0 and b > m else 0
    minnum = a + (1 if b >= n * m else 0)
    if y == 1:
        sergei = a + (1 if x <= b else 0)
    elif y == n:
        sergei = a + (1 if x + (n - 1) * m <= b else 0)
    else:
        sergei = a * 2
        sergei += 1 if x + (y - 1) * m <= b else 0
        sergei += 1 if x + (n * 2 - 1 - y) * m <= b else 0
    
print(maxnum, minnum, sergei)

n,m,k,x,y=list(map(int,input().split()))
t=n*m+(n-2)*m if n!=1 else m
b=k//t
g=[]
g.append([b for _ in range(m)])
for _ in range(n-2):
  g.append([2*b for _ in range(m)])
g.append([b for _ in range(m)])

r=k%t
mx=-1
mn=int(1e18)
for i in range(n):
  for j in range(m):
    if r>0:
      r-=1
      g[i][j]+=1
    mx=max(mx,g[i][j])
    mn=min(mn,g[i][j])
for i in range(n-2,0,-1):
  for j in range(m):
    if r>0:
      r-=1
      g[i][j]+=1
    mx=max(mx,g[i][j])
    mn=min(mn,g[i][j])
print(mx,mn,g[x-1][y-1])