#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n, i, a[100005], k, x = 1, a1, b1, prev = 0, y;
  cin >> n >> k;
  for (i = 1; i <= n; i++) {
    cin >> a[i];
  }
  sort(a + 1, a + n + 1);
  for (i = 2; i <= n; i++) {
    if (a[i] == a[i - 1]) {
      x++;
    } else {
      if (prev + x * n >= k) {
        a1 = a[i - 1];
        y = (k - prev) / x;
        if ((k - prev) % x == 0)
          b1 = a[y];
        else
          b1 = a[y + 1];
        cout << a1 << " " << b1 << "\n";
        return 0;
      } else {
        prev += (x * n);
        x = 1;
      }
    }
  }
  a1 = a[i - 1];
  y = (k - prev) / x;
  if ((k - prev) % x == 0)
    b1 = a[y];
  else
    b1 = a[y + 1];
  cout << a1 << " " << b1 << "\n";
  return 0;
}
