#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  long long n, k;
  cin >> n >> k;
  vector<long long> A(n);
  map<long long, long long> mp;
  for (auto& x : A) cin >> x, mp[x]++;
  sort(A.begin(), A.end());
  long long f = A[(k - 1) / n];
  for (auto& p : mp)
    if (k > p.second * n)
      k -= p.second * n;
    else {
      long long cnt = p.second;
      for (auto& p : mp)
        if (k > cnt * p.second)
          k -= p.second * cnt;
        else {
          cout << f << " " << p.first << "\n";
          return 0;
        }
    }
}
