#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  long long k;
  scanf("%d%I64d", &n, &k);
  vector<int> v(n);
  for (int i = 0; i < n; i++) scanf("%d", &v[i]);
  sort(v.begin(), v.end());
  printf("%d", v[(k - 1) / n]);
  int l = (k - 1) / n;
  while (l > 0 && v[l - 1] == v[l]) l--;
  int r = (k - 1) / n;
  while (r < n - 1 && v[r + 1] == v[r]) r++;
  int cnt = r - l + 1;
  printf(" %d", v[(k - 1 - (long long)l * n) / cnt]);
  return 0;
}
