#include <bits/stdc++.h>
using namespace std;
const int N = 100005;
long long a[N];
int main() {
  long long n, sn, sm = 0, q;
  long long k, p;
  cin >> n >> k;
  for (int i = 0; i < n; i++) cin >> a[i];
  sort(a, a + n);
  p = (k % n == 0) ? (k / n) - 1 : k / n;
  cout << a[p] << " ";
  sn = lower_bound(a, a + n, a[p]) - a;
  k -= sn * n;
  for (int i = sn; i < n; i++) {
    if (a[i] == a[p])
      sm++;
    else
      break;
  }
  q = (k % sm == 0) ? (k / sm) - 1 : k / sm;
  cout << a[q] << endl;
}
