#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n, k, fnum, lnum;
  long long arr[100005];
  long long cnt, floc, lloc;
  int i;
  cin >> n >> k;
  for (i = 1; i <= n; i++) {
    cin >> arr[i];
  }
  sort(arr + 1, arr + n + 1);
  fnum = arr[(k - 1) / n + 1];
  cnt = 0;
  for (i = 1; i <= n; i++) {
    if (arr[i] == fnum) {
      cnt++;
    }
  }
  for (i = 1; i <= n; i++) {
    if (arr[i] == fnum) {
      floc = i;
      break;
    }
  }
  lloc = k - (floc - 1) * n;
  if (lloc <= cnt) {
    lnum = arr[1];
  } else {
    lnum = arr[(lloc - 1) / cnt + 1];
  }
  cout << fnum << " " << lnum << endl;
  return 0;
}
