#include <bits/stdc++.h>
using namespace std;
long long n, k, a[100010], t;
inline long long read() {
  long long x = 0, tmp = 1;
  char ch = getchar();
  while (!isdigit(ch)) {
    if (ch == '-') tmp = -1;
    ch = getchar();
  }
  while (isdigit(ch)) {
    x = (x << 3) + (x << 1) + ch - 48;
    ch = getchar();
  }
  return tmp * x;
}
int main() {
  n = read();
  k = read() - 1;
  for (long long i = 0; i < n; i++) a[i] = read();
  sort(a, a + n);
  long long i;
  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("%lld %lld\n", a[i], a[k / t]);
  return 0;
}
