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