#include<bits/stdc++.h> #define SINGLE_INPUT #define ll long long #define ull unsigned long long #define N 500005 #define MOD 998244353 usingnamespace std;
voidsol(){ ll n, k; cin >> n >> k; k--; vector<ll> a(n); map<ll, int> mp; for (ll& i : a) cin >> i, mp[i]++; sort(a.begin(), a.end()); ll s = k / n, e = s; while (s != -1 && a[s] == a[e]) s--; ll m = k - (s + 1) * n; // cout << m << " " << mp[a[e]] << "\n"; cout << a[k / n] << " " << a[m / mp[a[e]]] << "\n"; }