little A and little Huan are both smart ACMer. little Huan likes to study matrix problems. One day, little A gave little Huan an interesting matrix problem. little A provides little Huan with a matrix of of n lines m columns and four integers . Using the matrix and the integers
, determine the value of the element in the
row and
column of the matrix is
. Now Little A asks Huan what is the K'th smallest element of this matrix. For example, 1,2,3,4. The 2'th smallest value is 2.
The first line contains three integers
,represents the size of the matrix and the K'th largest.
The second line contains three integers
Print one integer----the K'th smallest element of this matrix