#include <bits/stdc++.h>
using namespace std;
const int MAXN = 100000 + 100;
long long a[MAXN], n, k;
long long tekrar[MAXN];
int main() {
  cin >> n >> k;
  for (int i = 0; i < n; i++) cin >> a[i];
  sort(a, a + n);
  int ptr;
  for (int i = 0; i < n; i++) {
    ptr = i;
    int cnt = 0;
    while (a[ptr] == a[i] && i <= n) {
      i++;
      cnt++;
    }
    i--;
    if (k > n * cnt) {
      k -= n * cnt;
      continue;
    }
    k--;
    cout << a[ptr] << " " << a[k / cnt] << endl;
    break;
  }
  return 0;
}
