#include <bits/stdc++.h>
using namespace std;
const double PI = 3.14159265358979;
const double PI2 = 6.28318530717958;
const double PId2 = 1.570796326794895;
inline long long pw(long long n, int p) {
  long long ans = 1;
  for (int i = 0; i < p; i++) ans *= n;
  return ans;
}
inline vector<int> ReadVI(int count) {
  vector<int> arrayname(count);
  for (int i = 0; i < int(count); i++) cin >> arrayname[i];
  return arrayname;
};
inline vector<long long> ReadVlong(int count) {
  vector<long long> arrayname(count);
  for (int i = 0; i < int(count); i++) cin >> arrayname[i];
  return arrayname;
};
inline vector<pair<int, int> > ReadVII(int count) {
  vector<pair<int, int> > arrayname(count);
  for (int i = 0; i < int(count); i++) {
    cin >> arrayname[i].first;
    arrayname[i].second = i;
  }
  return arrayname;
};
const int MOD = 1000000007;
const int MAXVALUE = 101;
int main() {
  long long n;
  long long k;
  cin >> n >> k;
  vector<long long> a = ReadVlong(n);
  map<long long, long long> m;
  sort(a.begin(), a.end());
  for (long long i = 0; i < n; i++) m[a[i]]++;
  long long gr = a[(k - 1) / n];
  cout << gr << " ";
  for (auto it = m.begin(); it != m.end(); it++)
    if (k > it->second * n)
      k -= it->second * n;
    else
      break;
  cout << a[(k - 1) / m[gr]];
}
