#include <bits/stdc++.h>
using namespace std;
int mat[100001], mat2[100001];
long long k, suma, a, b, s, c;
int n;
map<int, int> mapa;
long long ct;
int main() {
  cin >> n >> k;
  for (int i = 0; i < n; ++i) {
    cin >> mat[i];
    mapa[mat[i]]++;
  }
  sort(mat, mat + n);
  suma = 1;
  c = 1;
  for (int i = 0; i < n; i++) {
    if (i == 0) {
    } else if (mat[i] == mat[i - 1]) {
      suma += n;
      continue;
    }
    ct = mapa[mat[i]];
    if (suma + ct * n > k) {
      a = mat[i];
      s = k - suma;
      b = mat[(int)(s / ct)];
      break;
    }
    suma += n;
  }
  cout << a << " " << b << endl;
  return 0;
}
