#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n, i, j, ct;
  long long k;
  cin >> n >> k;
  int A[n], v;
  for (i = 0; i < n; i++) cin >> A[i];
  sort(A, A + n);
  i = 0;
  while (i < n) {
    v = A[i];
    j = i + 1;
    while (j < n && A[j] == A[i]) j++;
    ct = j - i;
    if (ct * n < k) {
      k -= ct * n;
      i = j;
    } else {
      cout << v << " " << A[(k - 1) / ct] << endl;
      break;
    }
  }
  return 0;
}
