#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 10;
int n, a[N];
long long k;
int main() {
  scanf("%d", &n);
  cin >> k;
  --k;
  for (int i = 0; i < n; ++i) scanf("%d", &a[i]);
  sort(a, a + n);
  int fi = (int)(k / n);
  while (a[fi] == a[fi - 1] && fi > 0) --fi;
  cout << a[fi] << " ";
  int cnt = 0;
  for (int i = 0; i < n; ++i)
    if (a[i] == a[fi]) ++cnt;
  k -= 1ll * fi * n;
  int se = (int)(k / cnt);
  cout << a[se] << " " << endl;
  return 0;
}
