#include <bits/stdc++.h>
using namespace std;
const long long N = 1e5;
long long a[N];
map<long long, long long> mp;
int32_t main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  long long n, k, cnt = 0;
  cin >> n >> k;
  for (long long i = 0; i < n; i++) {
    cin >> a[i];
    mp[a[i]]++;
  }
  sort(a, a + n);
  long long fi = 0, si = 0;
  fi = (k - 1) / n;
  cout << a[fi] << ' ';
  for (auto i : mp) {
    if (i.first == a[fi]) break;
    cnt += i.second * n;
  }
  for (auto i : mp) {
    cnt += mp[a[fi]] * i.second;
    if (cnt >= k) {
      cout << i.first << '\n';
      break;
    }
  }
  return 0;
}
