#include <bits/stdc++.h>
using namespace std;
const int MAXN = 100100;
int N;
long long K;
int ar[MAXN];
int main() {
  cin >> N >> K;
  for (int i = 0; i < N; i++) cin >> ar[i];
  --K;
  sort(ar, ar + N);
  for (int i = 0; i < N;) {
    int cur = i;
    int cnt = 0;
    while (i < N && ar[i] == ar[cur]) {
      ++i;
      ++cnt;
    }
    if (K < (long long)cnt * N) {
      cout << ar[cur] << ' ' << ar[(int)(K / cnt)] << endl;
      break;
    }
    K -= (long long)cnt * N;
  }
  return 0;
}
