You've got another problem dealing with arrays. Let's consider an arbitrary sequence containing *n* (not necessarily different) integers *a*<sub class="lower-index">1</sub>, *a*<sub class="lower-index">2</sub>, ..., *a*<sub class="lower-index">*n*</sub>. We are interested in all possible pairs of numbers (*a*<sub class="lower-index">*i*</sub>, *a*<sub class="lower-index">*j*</sub>), (1 ≤ *i*, *j* ≤ *n*). In other words, let's consider all *n*<sup class="upper-index">2</sup> pairs of numbers, picked from the given array.

For example, in sequence *a* = {3, 1, 5} are 9 pairs of numbers: (3, 3), (3, 1), (3, 5), (1, 3), (1, 1), (1, 5), (5, 3), (5, 1), (5, 5).

Let's sort all resulting pairs lexicographically by non-decreasing. Let us remind you that pair (*p*<sub class="lower-index">1</sub>, *q*<sub class="lower-index">1</sub>) is lexicographically less than pair (*p*<sub class="lower-index">2</sub>, *q*<sub class="lower-index">2</sub>) only if either *p*<sub class="lower-index">1</sub> &lt; *p*<sub class="lower-index">2</sub>, or *p*<sub class="lower-index">1</sub> = *p*<sub class="lower-index">2</sub> and *q*<sub class="lower-index">1</sub> &lt; *q*<sub class="lower-index">2</sub>.

Then the sequence, mentioned above, will be sorted like that: (1, 1), (1, 3), (1, 5), (3, 1), (3, 3), (3, 5), (5, 1), (5, 3), (5, 5)

Let's number all the pair in the sorted list from 1 to *n*<sup class="upper-index">2</sup>. Your task is formulated like this: you should find the *k*-th pair in the ordered list of all possible pairs of the array you've been given.
The first line contains two integers *n* and *k* (1 ≤ *n* ≤ 10<sup class="upper-index">5</sup>, 1 ≤ *k* ≤ *n*<sup class="upper-index">2</sup>). The second line contains the array containing *n* integers *a*<sub class="lower-index">1</sub>, *a*<sub class="lower-index">2</sub>, ..., *a*<sub class="lower-index">*n*</sub> ( - 10<sup class="upper-index">9</sup> ≤ *a*<sub class="lower-index">*i*</sub> ≤ 10<sup class="upper-index">9</sup>). The numbers in the array can coincide. All numbers are separated with spaces.

Please do not use the %lld specificator to read or write 64-bit integers in С++. It is preferred to use cin, cout, streams or the %I64d specificator instead.
2 4
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 5 1 3 5 5 5 2 6 6 6 3 1 5 4 6 3 3 4 3 1 4 1 1 1 1 2 4 2 6
4 4
10 50
1 1 -9 -9 -9 7 7 7 7 7
1 7
9 76
1 1 2 2 2 2 3 3 9
9 2
5 15
1 1 1 2 2
1 2
5 7
1 3 3 3 5
3 1
10 91
1 1 1 1 1 1 1 1 1 2
2 1
5 20
1 2 2 3 3
3 2
6 36
1 1 2 2 2 2
2 2
5 16
1 1 2 2 3
2 2
5 17
1 3 3 5 5
5 1
5 17
1 3 3 3 5
3 3
10 25
1 2 2 3 4 5 6 7 8 9
2 7
10 90
1 1 1 1 1 1 1 1 1 2
1 2
4 5
3 1 3 1
1 3
3 5
1 1 2
1 2
5 3
0 1 2 3 4
0 2
import sys
input = lambda: sys.stdin.readline().rstrip()
from collections import deque,defaultdict,Counter
from itertools import permutations,combinations
from bisect import *
from heapq import *
from math import ceil,gcd,lcm,floor,comb
alph = 'abcdefghijklmnopqrstuvwxyz'
#pow(x,mod-2,mod)

N,K = map(int,input().split())
A = sorted(list(map(int,input().split())))
k = (K+N-1)//N-1
cnt = A.index(A[k])
num = A.count(A[cnt])
print(A[k],A[(K-(N*cnt)-1)//num])
