#include <bits/stdc++.h>
using namespace std;
int main(int argc, char const *argv[]) {
  long long n, k;
  cin >> n >> k;
  map<long long, long> duplicate;
  map<long long, long> dupStart;
  vector<long long> a;
  for (size_t i = 0; i < n; ++i) {
    long long b = 0;
    cin >> b;
    a.push_back(b);
  }
  sort(a.begin(), a.end());
  for (size_t i = 1; i < a.size(); ++i) {
    if (a[i] == a[i - 1]) {
      if (duplicate.find(a[i]) == duplicate.end()) {
        duplicate[a[i]] = 0;
        dupStart[a[i]] = i - 1;
      }
      duplicate[a[i]]++;
    }
  }
  if (a.size() == 1) {
    cout << a[0] << " " << a[0];
    return 0;
  }
  {
    long long d = k % a.size();
    long long e = k / a.size();
    if (d == 0) {
      --e;
      d = a.size() - 1;
    } else {
      --d;
    }
    long long x, y;
    x = a[e];
    if (duplicate.find(x) != duplicate.end()) {
      int dup = duplicate[x] + 1;
      long long offset = (e - dupStart[x]) * a.size();
      d += offset;
      d /= dup;
    }
    y = a[d];
    cout << x << " " << y << endl;
  }
  return 0;
}
