#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e5 + 10;
int n;
long long k;
int a[maxn];
int x, y;
void solve() {
  sort(a + 1, a + 1 + n);
  for (int i = 1; i <= n; ++i) {
    int j = i;
    while (j <= n && a[i] == a[j]) ++j;
    int sz = j - i;
    if (1LL * sz * n < k)
      k -= 1LL * sz * n;
    else {
      for (int p = 1; p <= n; ++p)
        if (sz < k)
          k -= sz;
        else {
          x = a[i];
          y = a[p];
          return;
        }
    }
    i = j - 1;
  }
}
int main() {
  cin.sync_with_stdio(false);
  cin >> n >> k;
  for (int i = 1; i <= n; ++i) cin >> a[i];
  solve();
  cout << x << " " << y << endl;
  return 0;
}
