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