#include <bits/stdc++.h>
using namespace std;
const int N = 100010;
int n, p, x, a[N];
long long k;
int main() {
  scanf("%d %lld", &n, &k);
  for (int i = 1; i <= n; i++) scanf("%d", &a[i]);
  sort(a + 1, a + n + 1);
  a[0] = -1000000007;
  for (int i = 1; i <= n; i++)
    if (a[i] != a[i - 1] && ((long long)i - 1) * n < k) p = i;
  printf("%d ", a[p]);
  k -= ((long long)p - 1) * n;
  for (int i = 1; i <= n; i++)
    if (a[i] == a[p]) x++;
  for (int i = 1; i <= n; i++)
    if (a[i] != a[i - 1] && ((long long)i - 1) * x < k) p = i;
  printf("%d", a[p]);
  return 0;
}
