#include <bits/stdc++.h>
using namespace std;
const long long inf = 1e18;
const long long minf = -(1e18);
const long long mod = 1e9 + 7;
const long long med = 1e9 + 9;
inline long long add(long long x, long long y) {
  x += y;
  if (x >= mod) x -= mod;
  return x;
}
inline long long sub(long long x, long long y) {
  x -= y;
  if (x < 0) x += mod;
  return x;
}
inline long long mul(long long x, long long y) { return (x * 1ll * y) % mod; }
long long power(long long x, long long y) {
  if (y == 0) return 1;
  if (y == 1) return x;
  long long ans = power(x, y / 2) % mod;
  ans *= ans;
  ans %= mod;
  if (y % 2) ans *= x;
  return ans % mod;
}
long long inv(long long x, long long y) {
  x += mod;
  y += mod;
  x %= mod;
  y %= mod;
  long long ret = (power(y, mod - 2) % mod) * x;
  return (ret % mod);
}
int main() {
  ios_base::sync_with_stdio(false), cin.tie(NULL), cout.tie(NULL);
  long long n, k;
  cin >> n >> k;
  map<long long, long long> x;
  vector<pair<long long, long long>> wei;
  int temp;
  for (int i = 1; i <= n; i++) {
    cin >> temp;
    x[temp]++;
  }
  for (auto i : x) {
    wei.push_back(make_pair(i.first, i.second));
  }
  sort(wei.begin(), wei.end());
  int posx = wei[0].first;
  int posy = 0;
  long long sum = 0;
  for (int i = 0; i < wei.size(); i++) {
    if (wei[i].second * n >= k) {
      posx = wei[i].first;
      posy = i;
      break;
    }
    k -= wei[i].second * n;
    posx = wei[i].first;
    posy = i;
  }
  int posz = 0;
  while (1 && posz < wei.size()) {
    if (wei[posy].second * wei[posz].second < k) {
      k -= wei[posy].second * wei[posz].second;
      posz++;
    } else {
      break;
    }
  }
  cout << posx << " " << wei[posz].first;
  return 0;
}
