#include <bits/stdc++.h>
using namespace std;
int dx[] = {0, 0, 1, -1};
int dy[] = {1, -1, 0, 0};
int main() {
  long long n, k, x, tk;
  cin >> n >> k;
  map<int, long long> m;
  for (int i = (0); i < (n); i++) cin >> x, m[x]++;
  tk = k;
  for (__typeof(m.begin()) it = m.begin(); it != m.end(); it++) {
    if (tk <= n * (*it).second) {
      cout << (*it).first << " ";
      for (__typeof(m.begin()) it1 = m.begin(); it1 != m.end(); it1++) {
        if (tk <= (*it).second * (*it1).second) {
          cout << (*it1).first;
          break;
        } else
          tk -= (*it).second * (*it1).second;
      }
      break;
    } else
      tk -= n * (*it).second;
  }
  return 0;
}
