#include <bits/stdc++.h>
using namespace std;
int N, M, T;
map<int, int> a;
map<int, int>::iterator it;
int main() {
  int i, j, k;
  long long A, B;
  scanf("%d%I64d", &N, &A);
  for (i = 1; i <= N; i++) {
    scanf("%d", &k);
    a[k]++;
  }
  B = 0;
  for (it = a.begin(); it != a.end(); it++) {
    if ((long long)N * (*it).second + B < A)
      B += (long long)N * (*it).second;
    else {
      A -= B;
      k = (*it).second;
      printf("%d", (*it).first);
      for (it = a.begin(); it != a.end(); it++) {
        A -= ((long long)k * (*it).second);
        if (A <= 0) {
          printf(" %d\n", (*it).first);
          scanf(" ");
          return 0;
        }
      }
    }
  }
  scanf(" ");
}
