#include <bits/stdc++.h>
using namespace std;
using namespace std;
template <class T>
ostream& operator<<(ostream& out, const vector<T>& data) {
  out << "[";
  for (int i = 0; i < (int)data.size(); ++i)
    out << data[i] << (i == data.size() - 1 ? "" : ",");
  out << "]";
  return out;
}
template <class T>
ostream& operator<<(ostream& out, const set<T>& s) {
  out << "{";
  for (typename set<T>::iterator itr = s.begin(); itr != s.end(); ++itr)
    out << *itr << " ";
  out << "}";
  return out;
}
template <class T>
ostream& operator<<(ostream& out, const multiset<T>& s) {
  out << "{";
  for (typename multiset<T>::iterator itr = s.begin(); itr != s.end(); ++itr)
    out << *itr << " ";
  out << "}";
  return out;
}
template <class T1, class T2>
ostream& operator<<(ostream& out, const pair<T1, T2>& p) {
  out << "(" << p.first << "," << p.second << ")";
  return out;
}
template <class T1, class T2>
ostream& operator<<(ostream& out, const map<T1, T2>& m) {
  for (typename map<T1, T2>::const_iterator itr = m.begin(); itr != m.end();
       ++itr)
    out << itr->first << "->" << itr->second << " ";
  return out;
}
long long N, K;
vector<int> a;
void york() {
  cin >> N >> K;
  a.resize(N);
  for (int i = 0; i < N; ++i) scanf("%d", &a[i]);
  sort(a.begin(), a.end());
  int i = 0;
  while (true) {
    if (K == 0) break;
    int j = i;
    while (j < N && a[j] == a[i]) j++;
    long long same = j - i;
    if (K <= same * N) {
      long long off = (K - 1) / same;
      cout << a[i] << " " << a[off] << endl;
      break;
    } else {
      K -= same * N;
    }
    i = j;
  }
}
int main() {
  york();
  return 0;
}
