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