#include <bits/stdc++.h>
using namespace std;
void Weapons19() {
  cin.sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
}
int32_t main() {
  Weapons19();
  long long n, k;
  cin >> n >> k;
  vector<long long> v(n);
  map<long long, long long> m;
  for (long long i = 0; i < n; i++) {
    cin >> v[i];
    m[v[i]]++;
  }
  sort(v.begin(), v.end());
  map<long long, long long> z;
  for (long long i = 0; i < n; i++) {
    if (z[v[i]]) continue;
    if (k > n * m[v[i]]) {
      k = k - n * m[v[i]];
      z[v[i]] = 1;
      continue;
    }
    cout << v[i] << " ";
    for (long long j = 0; j < n; j++) {
      if (k > m[v[i]])
        k -= m[v[i]];
      else {
        cout << v[j];
        return 0;
      }
    }
  }
}
