#include <bits/stdc++.h>
using namespace std;
long long k;
long n;
long a[100010], id[100010];
long long dd[100010], sl[100010];
int main() {
  scanf("%ld%I64d", &n, &k);
  for (long i = 1; i <= n; ++i) scanf("%ld", &a[i]);
  sort(a + 1, a + n + 1);
  id[1] = 1;
  sl[1] = 1;
  dd[1] = a[1];
  for (long i = 2; i <= n; ++i)
    if (a[i] == a[i - 1]) {
      sl[id[i - 1]]++;
      id[i] = id[i - 1];
    } else {
      id[i] = id[i - 1] + 1;
      sl[id[i]] = 1;
      dd[id[i]] = a[i];
    }
  for (long i = 1; i <= id[n]; ++i)
    if (k > sl[i] * n)
      k -= sl[i] * n;
    else {
      printf("%ld ", dd[i]);
      long tmp;
      if (k % sl[i] > 0)
        tmp = 1;
      else
        tmp = 0;
      printf("%ld", a[k / sl[i] + tmp]);
      return 0;
    }
  return 0;
}
