#include <bits/stdc++.h>
using namespace std;
long long int a[1000005];
int main() {
  ios::sync_with_stdio(0);
  long long int n, k, c1 = 0, c2 = 0;
  cin >> n >> k;
  for (int i = 0; i < n; i++) cin >> a[i];
  sort(a, a + n);
  k--;
  long long int x = k / n;
  for (int i = 0; i < n; i++) {
    if (a[i] < a[x]) c1++;
    if (a[i] == a[x]) c2++;
  }
  long long int y = k - n * c1;
  y /= c2;
  cout << a[x] << " " << a[y];
}
