#include <bits/stdc++.h>
using namespace std;
const long long N = 1e5 + 10;
long long a[N];
int32_t main() {
  long long n, k;
  cin >> n >> k;
  for (long long i = 0; i < n; i++) {
    cin >> a[i];
  }
  sort(a, a + n);
  for (long long i = 0; i < n; i++) {
    long long t = 1;
    while (a[i] == a[i + 1]) {
      t++;
      i++;
    }
    if (k - t * n > 0)
      k -= t * n;
    else {
      cout << a[i] << ' ' << a[(k + t - 1) / t - 1] << "\n";
      return 0;
    }
  }
}
