#include <bits/stdc++.h>
using namespace std;
int main() {
  unsigned long long int n, k;
  scanf("%I64d %I64d\n", &n, &k);
  vector<int> V(n);
  for (int i = 0; i < n; i++) scanf("%d", &V[i]);
  sort((V).begin(), (V).end());
  unsigned long long int cnt =
      count_if((V).begin(), (V).end(),
               [&](int x) -> bool { return (x < V[(k - 1) / n]); });
  unsigned long long int num = count((V).begin(), (V).end(), V[(k - 1) / n]);
  printf("%d %d", V[(k - 1) / n], V[((k - 1) - n * cnt) / num]);
  return (0);
}
