#include <bits/stdc++.h>
using namespace std;
int fr[100005];
int main() {
  ios::sync_with_stdio(0);
  long long n, k, b, y, p, u, l, v;
  cin >> n >> k;
  int a[n];
  for (int i = 0; i < n; i++) {
    cin >> a[i];
  }
  sort(a, a + n);
  y = k / n;
  b = k % n;
  if (b) y++;
  l = lower_bound(a, a + n, a[y - 1]) - a;
  u = upper_bound(a, a + n, a[y - 1]) - a;
  v = u - l;
  k -= (l)*n;
  if (k <= 0)
    p = y;
  else {
    for (int i = 0; i < n; i++) {
      if (i >= l && i < l + v) {
        k -= v * v;
        if (k <= 0) {
          p = a[i];
          break;
        }
        i += v - 1;
        continue;
      }
      k -= v;
      if (k <= 0) {
        p = a[i];
        break;
      }
    }
  }
  cout << a[y - 1] << "  " << p;
}
