#include <bits/stdc++.h>
using namespace std;
int a[100005], f[100005];
int main() {
  int n, i;
  long long k;
  map<int, int> cnt;
  scanf("%d", &n);
  cin >> k;
  k--;
  for (i = 0; i < n; ++i) scanf("%d", &a[i]), cnt[a[i]]++;
  sort(a, a + n);
  f[0] = 0;
  for (i = 1; i < n; ++i) f[i] = a[i] == a[i - 1] ? f[i - 1] : i;
  printf("%d ", i = a[k / n]);
  k -= 1LL * n * f[k / n];
  printf("%d\n", a[k / cnt[i]]);
}
