#include <bits/stdc++.h>
void merge(int *m1, int *m2, int n1, int n2, int *tmp) {
  int i, i1, i2;
  for (i = i1 = i2 = 0; i1 < n1 && i2 < n2;) {
    if (m1[i1] <= m2[i2])
      tmp[i++] = m1[i1++];
    else
      tmp[i++] = m2[i2++];
  }
  while (i1 < n1) tmp[i++] = m1[i1++];
  while (i2 < n2) tmp[i++] = m2[i2++];
}
void mergesort(int *m, int *tmp, int n) {
  int n1, n2;
  if (n <= 1) return;
  n1 = n / 2;
  n2 = n - n1;
  mergesort(m, tmp, n1);
  mergesort(m + n1, tmp, n2);
  merge(m, m + n1, n1, n2, tmp);
  for (int i = 0; i < n; i++) m[i] = tmp[i];
}
int main() {
  unsigned long long n, k, i, j, p, cnt = 0;
  int a[100000], tmp[100000], x;
  scanf("%I64d %I64d", &n, &k);
  for (i = 0; i < n; i++) scanf("%d", &a[i]);
  mergesort(a, tmp, n);
  j = k % n;
  i = k / n;
  if (j > 0)
    i++;
  else
    j = n;
  x = a[i - 1];
  i = 20000;
  for (p = 0; p < n; p++)
    if (a[p] == x) {
      if (i == 20000) i = p;
      cnt++;
    }
  i++;
  k = k - n * (i - 1);
  if (k % cnt != 0)
    j = k / cnt + 1;
  else
    j = k / cnt;
  printf("%d %d\n", a[i - 1], a[j - 1]);
  return 0;
}
