#include <bits/stdc++.h>
int cmpfunc(const void* a, const void* b) { return (*(int*)a - *(int*)b); }
int main() {
  long long int a, b, c, e, i, j, k, sum1 = 0, max = -1;
  long long int f = -1, d;
  int sum = 0;
  int x[200002];
  scanf("%lld %lld", &a, &b);
  for (i = 0; i < a; i++) {
    scanf("%d", &x[i]);
  }
  qsort(x, a, sizeof(int), cmpfunc);
  c = (b - 1) / a;
  for (i = 0; i < a; i++) {
    if (x[i] == x[c] && sum == 0) {
      f = i;
    }
    if (x[i] == x[c]) sum++;
    if (x[i] > x[c]) break;
  }
  printf("%d ", x[c]);
  d = b - (f * a);
  e = (d - 1) / sum;
  printf("%d", x[e]);
  return 0;
}
