#include <bits/stdc++.h>
using namespace std;
long long n, i, k, cnt, val, a[100010];
int main() {
  cin >> n >> k;
  for (i = 1; i <= n; i++) cin >> a[i];
  sort(a + 1, a + n + 1);
  val = (k - 1) / n + 1;
  cnt = 1;
  for (i = val + 1; i <= n && (a[i] == a[i - 1]); i++) cnt++;
  for (i = val - 1; i >= 1 && (a[i] == a[i + 1]); i--) cnt++;
  k = k - i * n;
  k = (k - 1) / cnt + 1;
  cout << a[val] << ' ' << a[k];
  return 0;
}
