#include <bits/stdc++.h>
using namespace std;
const int dl = 10069;
void bib() {
  for (int i = 0; i < (int)10; i++) {
    cout << "\a";
  }
}
int main() {
  long long n, k;
  cin >> n >> k;
  long long a[n];
  for (long long i = 0; i < n; i++) {
    cin >> a[i];
  }
  sort(a, a + n);
  k--;
  long long x = 0, y = 0;
  for (long long i = 0; i < n; i++) {
    if (a[i] < a[k / n]) x++;
    if (a[i] == a[k / n]) y++;
  }
  cout << a[k / n] << " " << a[(k - n * x) / y];
  return 0;
}
