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