#include <bits/stdc++.h>
using namespace std;
int A[111111], o[111111];
int main() {
  long long k, tk;
  int n;
  cin >> n;
  cin >> k;
  tk = k;
  for (int i = 0; i < n; i++) cin >> A[i];
  sort(A, A + n);
  o[0] = 1;
  for (int i = 1; i < n; i++) {
    if (A[i] == A[i - 1]) {
      o[i] = o[i - 1] + 1;
      o[i - 1] = 0;
    } else
      o[i] = 1;
  }
  long long int minus = n;
  int x, y;
  for (int i = 0; i < n; i++) {
    if (o[i] == 0) continue;
    k -= (long long)o[i] * minus;
    if (k <= 0) {
      k += o[i] * minus;
      x = A[i];
      for (int it = 0; it < n; it++) {
        k -= o[i];
        if (k <= 0) {
          y = A[it];
          goto end;
        }
      }
    }
  }
end:;
  printf("%d %d\n", x, y);
  return 0;
}
