#include <bits/stdc++.h>
using namespace std;
using ll = long long;
const int N = 1e5 + 5;
int main(int argc, char const *argv[]) {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  ll n, k;
  cin >> n >> k;
  vector<ll> a(n);
  map<ll, ll> cnt;
  for (int i = 0; i < n; i++) {
    cin >> a[i];
    cnt[a[i]]++;
  }
  sort(a.begin(), a.end());
  for (int i = 0; i < n; i++) {
    if (i and a[i] == a[i - 1]) continue;
    if (k <= cnt[a[i]] * n) {
      cout << a[i] << ' ' << a[(k - 1) / cnt[a[i]]];
      return 0;
    }
    k -= cnt[a[i]] * n;
  }
  return 0;
}
