#include <bits/stdc++.h>
using namespace std;
int Arr[100005];
long long b[100005];
int main() {
  ios_base::sync_with_stdio(false);
  long long n, k;
  cin >> n >> k;
  map<int, long long> cnt;
  map<int, long long> x;
  for (int i = 0; i < n; i++) {
    cin >> Arr[i];
    cnt[Arr[i]]++;
  }
  sort(Arr, Arr + n);
  for (int i = 0; i < n; i++) {
    x[Arr[i]]++;
    b[i] = x[Arr[i]] - 1;
  }
  long long ind = (k - 1) / n;
  long long ind1 = ((k - 1) % n + b[ind] * n) / cnt[Arr[ind]];
  cout << Arr[ind] << " " << Arr[ind1] << endl;
  return 0;
}
