#include <bits/stdc++.h>
using namespace std;
int a[100000];
int n;
long long k;
pair<int, int> solve() {
  map<int, int> numbers;
  for (int i = 0; i < n; i++) {
    numbers[a[i]]++;
  }
  pair<int, int> res;
  long long amount = 1;
  for (typeof(numbers.begin()) q = numbers.begin(); q != numbers.end(); q++) {
    long long s = q->second * (long long)n;
    if (k <= s) {
      amount = q->second;
      res.first = q->first;
      break;
    } else {
      k -= s;
    }
  }
  for (typeof(numbers.begin()) q = numbers.begin(); q != numbers.end(); q++) {
    long long s = amount * q->second;
    if (k <= s) {
      res.second = q->first;
      break;
    } else {
      k -= s;
    }
  }
  return res;
}
int main() {
  int i;
  cin >> n >> k;
  for (i = 0; i < n; i++) cin >> a[i];
  pair<int, int> V = solve();
  cout << V.first << " " << V.second << endl;
}
