#include <bits/stdc++.h>
using namespace std;
int main() {
  long long arr[100005];
  long long n, k;
  long long fir, sec;
  scanf("%lld%lld", &n, &k);
  for (int i = 1; i <= n; i++) scanf("%lld", &arr[i]);
  sort(arr + 1, arr + 1 + n);
  fir = arr[1 + (k - 1) / n];
  long long cnt = 0;
  long long loc = lower_bound(arr + 1, arr + 1 + n, fir) - (arr);
  for (int i = loc; i <= n; i++) {
    if (arr[i] == fir) cnt++;
  }
  long long lastloc = k - n * (loc - 1);
  if (lastloc <= cnt)
    sec = arr[1];
  else
    sec = arr[(lastloc - 1) / cnt + 1];
  printf("%lld %lld\n", fir, sec);
  return 0;
}
