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