#include <bits/stdc++.h>
using namespace std;
const int N = 100100;
long long arr[N];
int main() {
  long long n, k;
  cin >> n >> k;
  for (int i = 0; i < n; ++i) cin >> arr[i];
  sort(arr, arr + n);
  --k;
  int x = 0, y = 0;
  for (int i = 0; i < n; ++i) {
    if (arr[i] < arr[k / n]) x++;
    if (arr[i] == arr[k / n]) y++;
  }
  cout << arr[k / n] << " " << arr[(k - n * x) / y] << endl;
  return 0;
}
