#include <bits/stdc++.h>
using namespace std;
int main() {
  map<int, int> mapNum;
  int i, n, num, x, y;
  long long k;
  cin >> n >> k;
  for (i = 0; i < n; i++) {
    cin >> num;
    mapNum[num]++;
  }
  map<int, int>::iterator iter;
  for (iter = mapNum.begin(); iter != mapNum.end(); iter++) {
    if (k <= iter->second * 1ll * n)
      break;
    else
      k -= iter->second * 1ll * n;
  }
  x = iter->first;
  for (iter = mapNum.begin(); iter != mapNum.end(); iter++) {
    if (k <= iter->second * 1ll * mapNum[x])
      break;
    else
      k -= iter->second * 1ll * mapNum[x];
  }
  y = iter->first;
  cout << x << " " << y << endl;
}
