#include <bits/stdc++.h>
using namespace std;
const long long INF = 1000000000000000;
int32_t main() {
  ios_base::sync_with_stdio(false);
  cin.tie(nullptr);
  long long n, k;
  cin >> n >> k;
  vector<long long> a(n);
  map<long long, long long> count;
  for (long long i = 0; i < n; i++) {
    cin >> a[i];
    count[a[i]]++;
  }
  sort(a.begin(), a.end());
  for (auto it : count) {
    if (k > it.second * n) {
      k -= it.second * n;
    } else {
      for (auto i : count) {
        if (k > i.second * it.second) {
          k -= i.second * it.second;
        } else {
          cout << it.first << " " << i.first;
          return 0;
        }
      }
    }
    if (k == 0) {
    }
  }
  return 0;
}
