#include <bits/stdc++.h>
using namespace std;
const int N = 123456;
long long a[N];
long long n, k, tmp, cnt, x, y;
bool b, bb;
int main() {
  cin >> n >> k;
  k--;
  for (int i = 0; i < n; i++) cin >> a[i];
  sort(a, a + n);
  for (int i = 0; i <= n; i++) {
    if (i > 0 && a[i - 1] != a[i] && i * n > k && !b) {
      x = i - 1;
      while (x > 0 && a[x - 1] == a[x]) x--;
      b = 1;
    }
  }
  for (int i = 0; i < n; i++)
    if (a[i] == a[x]) cnt++;
  k -= (n * x);
  for (int i = 0; i <= n; i++)
    if (i > 0 && a[i] != a[i - 1] && i * cnt > k && !bb) {
      y = i - 1;
      bb = 1;
    }
  cout << a[x] << " " << a[y];
}
