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