#include <bits/stdc++.h>
using namespace std;
int arr[100005];
int main(int argc, char const* argv[]) {
  int n;
  scanf("%d", &n);
  long long k;
  scanf("%lld", &k);
  for (int i = 0; i < n; i += 1) {
    scanf("%d", &arr[i]);
  }
  sort(arr, arr + n);
  --k;
  for (int i = 0; i < n; i += 1) {
    long long prev = i;
    long long cc = 1;
    while (i + 1 < n && arr[i + 1] == arr[i]) {
      ++i;
      ++cc;
    }
    long long pairs = n * cc;
    if (k < pairs) {
      for (int j = 0; j < n; j += 1) {
        if (k < cc) {
          printf("%d %d\n", arr[i], arr[j]);
          break;
        }
        k -= cc;
      }
      break;
    }
    k -= pairs;
  }
  return 0;
}
