#include <bits/stdc++.h>
using namespace std;
int maxarr(vector<int> &arr);
int minarr(vector<int> &arr);
long long modulo(long long base, long long exponent, long long modulus);
int main() {
  long long n, k;
  cin >> n >> k;
  vector<int> a(n);
  for (int i = 0; i < n; i++) scanf("%d", &a[i]);
  ;
  long long temp, temp1;
  sort(a.begin(), a.end());
  long long same = 1;
  for (int i = 0; i < n; i++) {
    if (a[i] == a[i + 1] && i < n - 1) {
      same++;
      continue;
    } else {
      if (k > same * n) {
        k -= same * n;
        same = 1;
      } else {
        temp = i;
        if (k % same == 0)
          temp1 = k / same - 1;
        else
          temp1 = k / same;
        break;
      }
    }
  }
  cout << a[temp] << " " << a[temp1];
  return 0;
}
int maxarr(vector<int> &arr) {
  int maxi = INT_MIN;
  for (int i = 0; i < arr.size(); i++) maxi = max(arr[i], maxi);
  return maxi;
}
int minarr(vector<int> &arr) {
  int mini = INT_MAX;
  for (int i = 0; i < arr.size(); i++) mini = min(arr[i], mini);
  return mini;
}
long long modulo(long long base, long long exponent, long long modulus) {
  if (modulus == 1) return 0;
  long long result = 1;
  base = base % modulus;
  while (exponent > 0) {
    if (exponent % 2 == 1) {
      result = (result * base) % modulus;
    }
    exponent = exponent >> 1;
    base = (base * base) % modulus;
  }
  return result;
}
