#include <bits/stdc++.h>
using namespace std;
const long long INF = 1e9 + 7;
const int N = 2e5 + 10;
int main() {
  map<int, long long> m;
  long long k = 0;
  int n;
  cin >> n >> k;
  vector<int> v(n);
  for (auto &x : v) {
    cin >> x;
    m[x]++;
  }
  sort(v.begin(), v.end());
  k--;
  for (auto &p : m) {
    if (p.second * n <= k) {
      k -= p.second * n;
    } else {
      k /= p.second;
      cout << p.first << ' ' << v[k] << endl;
      break;
    }
  }
  return 0;
}
