#include <bits/stdc++.h>
using namespace std;
long long data[1000001], num[200001], rep[200001];
int main() {
  long long n, k, i, j;
  scanf("%I64d%I64d", &n, &k);
  for (i = 1; i <= n; ++i) scanf("%I64d", &data[i]);
  sort(data + 1, data + n + 1);
  for (i = 1, j = 0; i <= n; ++i)
    if (i == 1 || data[i] != num[j]) {
      num[++j] = data[i];
      rep[j] = 1;
    } else
      rep[j]++;
  for (i = 1; k > 0; ++i) k -= n * rep[i];
  k += n * rep[i - 1];
  printf("%I64d ", num[i - 1]);
  for (j = 1; k > 0; ++j) k -= rep[i - 1] * rep[j];
  printf("%I64d\n", num[j - 1]);
  return 0;
}
