#include <bits/stdc++.h>
using namespace std;
int a[100000 + 123];
long long n, k;
struct Tot {
  int num, value;
};
Tot t[100000 + 123];
int ton = 0;
int main() {
  cin >> n >> k;
  k = k - 1;
  for (int i = 0; i < n; ++i) scanf("%d", a + i);
  sort(a, a + n);
  ton++;
  t[0].value = a[0];
  t[0].num = 1;
  for (int i = 1; i < n; ++i) {
    if (a[i] == t[ton - 1].value)
      t[ton - 1].num++;
    else {
      ton++;
      t[ton - 1].num = 1;
      t[ton - 1].value = a[i];
    }
  }
  for (int i = 0; i < ton; ++i) {
    if (n * t[i].num <= k)
      k -= n * t[i].num;
    else {
      printf("%d %d\n", t[i].value, a[k / t[i].num]);
      break;
    }
  }
  return 0;
}
