#include <bits/stdc++.h>
using namespace std;
const int oo = (int)1e9;
const long long ool = (long long)1e17;
const double eps = 1e-7;
const double PI = acos(-1.0);
const int MX = 100009;
int arr[MX];
int main() {
  long long n, k;
  cin >> n >> k;
  if (cin.fail()) return 0;
  map<int, int> mp;
  for (int i = 0; i < n; i++) {
    cin >> arr[i];
    int &r = mp[arr[i]];
    r++;
  }
  k--;
  sort(arr, arr + n);
  for (__typeof(mp.begin()) it = mp.begin(); it != mp.end(); it++) {
    if (it->second * n <= k)
      k -= it->second * n;
    else {
      cout << it->first << " " << arr[k / it->second] << endl;
      break;
    }
  }
  return 0;
}
