#include <bits/stdc++.h>
int a[1 << 17], i, n;
long long k, t;
int main() {
  for (scanf("%d%I64d", &n, &k); i < n; ++i) scanf("%d", a + i);
  std::sort(a, a + n);
  --k;
  for (i = 0; i <= n; i += t) {
    for (t = 1; a[i] == a[i + t]; ++t)
      ;
    if (t * n > k) break;
    k -= t * n;
  }
  printf("%d %d", a[i], a[k / t]);
  return 0;
}
