#include <bits/stdc++.h>
using namespace std;
vector<int> v, A;
vector<pair<long long, long long> > v1;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  long long n;
  pair<long long, long long> k;
  k.second = 0;
  cin >> n >> k.first;
  map<long long, long long> m, m1;
  set<int> w;
  for (int i = 0; i < n; i++) {
    int c;
    cin >> c;
    w.insert(c);
    A.push_back(c);
    m[c]++;
    if (m1[c] == 0) v.push_back(c);
    m1[c] = 1;
  }
  sort(v.begin(), v.end());
  unsigned long long s = 0;
  if (A.size() == w.size()) {
    int a;
    for (int i = 0; i < v.size(); i++) {
      if (k.first > n) {
        k.first -= n;
      } else {
        cout << v[i] << " " << v[k.first - 1];
        return 0;
      }
    }
  }
  for (int i = 0; i < v.size(); i++) {
    s += (n * m[v[i]]);
    v1.push_back({s, v[i]});
  }
  int x, y, a;
  long long z;
  for (int i = 0; i < v1.size(); i++) {
    if (k.first <= v1[i].first) {
      x = v1[i].second;
      z = i;
      break;
    }
  }
  a = z;
  if (z > 0) {
    z = v1[z - 1].first;
  }
  for (int i = 0; i < v.size(); i++) {
    if (v[i] == v1[a].second) {
      if (z + (long long)pow(m[v[i]], 2) < k.first) {
        z += (long long)pow(m[v[i]], 2);
      } else {
        cout << x << " " << v[i];
        return 0;
      }
    } else {
      if (z + (m[v[i]] * m[v1[a].second]) < k.first) {
        z += (m[v[i]] * m[v1[a].second]);
      } else {
        cout << x << " " << v[i];
        return 0;
      }
    }
  }
  return 0;
}
