#include <bits/stdc++.h>
using namespace std;
int dy[] = {1, -1, 0, 0, -1, 1, 1, -1};
int dx[] = {0, 0, 1, -1, 1, -1, 1, -1};
void file() {}
void fast() {
  std::ios_base::sync_with_stdio(0);
  cin.tie(NULL);
}
int main() {
  file();
  fast();
  int n;
  cin >> n;
  long long k;
  cin >> k;
  vector<int> v1(n);
  for (auto& it : v1) cin >> it;
  sort(v1.begin(), v1.end());
  long long idx = 0;
  for (int i = 0; i < n; i++) {
    int j = i;
    while (j < n && v1[i] == v1[j]) j++;
    int cnt = j - i;
    if (idx + cnt * (long long)n < k) {
      idx += cnt * (long long)n;
      i = j - 1;
      continue;
    }
    for (j = 0; j < n; j++) {
      if (idx + cnt < k) {
        idx += cnt;
        continue;
      }
      return cout << v1[i] << ' ' << v1[j] << "\n", 0;
    }
  }
  return 0;
}
