#include <bits/stdc++.h>
using namespace std;
map<long long, long long> m;
long long a[100010];
set<long long> s;
int main() {
  long long n, k;
  cin >> n >> k;
  for (int i = 0; i < n; i++) {
    cin >> a[i];
    m[a[i]]++;
    s.insert(a[i]);
  }
  sort(a, a + n);
  long long first = a[(int)ceil((double)k / (double)n) - 1];
  cout << first << " ";
  long long rem = (k - 1) / n;
  long long sum = n * (lower_bound(a, a + n, first) - a);
  for (set<long long>::iterator it = s.begin(); it != s.end(); it++) {
    sum += m[first] * m[*it];
    if (sum >= k) {
      cout << (*it) << endl;
      break;
    }
  }
}
