#include <bits/stdc++.h>
using namespace std;
int a[100010], b[100010], n, m, i, j;
long long c[100010], now, t;
int main() {
  cin >> n >> t;
  for (i = 1; i <= n; i++) scanf("%d", &a[i]);
  sort(a + 1, a + n + 1);
  for (i = 1; i <= n; i++)
    if (i == 1 || a[i] != a[i - 1])
      b[++m] = a[i], c[m] = 1;
    else
      c[m]++;
  for (i = 1; i <= m; i++)
    if (now + c[i] * n >= t) {
      for (j = 1; j <= n; j++)
        if (now + c[i] >= t) {
          printf("%d %d\n", b[i], a[j]);
          break;
        } else
          now += c[i];
      break;
    } else
      now += c[i] * n;
  return 0;
}
