/* g++ -O2 -std=c++11 */
/* input/output streams and formatting */
#include <iostream>
#include <cstdio>
#include <sstream>
#include <iomanip>
/* data structures */
#include <vector>
#include <map>
#include <stack>
#include <queue>
#include <deque>
#include <set>
#include <bitset>
#include <unordered_map>
/* useful libs */
#include <cstring>
#include <cstdlib>
#include <algorithm>
#include <cmath>
#ifdef LOCAL_DEBUG
#include <ctime>
#endif
/* don't use this shit in your projects,
* it's only useful in olympiads !
*/
using namespace std;
/* some useful defines */
#define fi first
#define se second
#define pb(x) push_back(x)
#define ppb(x) pop_back(x)
#define mp(x, y) make_pair((x), (y))
#define all(a) (a).begin(), (a).end()
#define rall(a) (a).rbegin(), (a).rend()
#define forn(i, n) for(int i=0; i<(n); i++)
#define for1(i, n) for(int i=1; i<=(n); i++)
#define forr(i, n) for(int i=(n); i-->0; )
#define forab(i, a, b) for (int i=(int)(a); i<(int)(b); i++)
/* commonly used types */
typedef pair<int, int> pii;
typedef vector<int> vi;
typedef vector<pii> vpi;
typedef vector<vi> vvi;
typedef long long i64;
typedef vector<i64> vi64;
typedef vector<vi64> vv64;
typedef pair<i64, i64> pi64;
/* geometric types */
template <typename T> struct point2d { T x; T y; };
template <typename T> struct line2d { T a; T b; T c; };
template <typename T> struct circle2d { point2d<T> c; T r; };
typedef point2d<int> p2i;
typedef point2d<double> p2f;
typedef line2d<int> l2i;
typedef line2d<double> l2f;
typedef circle2d<int> c2i;
typedef circle2d<double> c2f;
#define su(m) ((m)*((m)+1))/2
i64 find(i64 a, i64 b, i64 k){
i64 m = (a + b)/(i64)2;
if (su(m) < k && su(m+1) >= k)
return m;
if (su(m) > k)
return find(a, m, k);
else
return find(m+1, b, k);
}
int a;
int main()
{
// input/output manipulation
ios::sync_with_stdio(false);
cout.precision(10);
cout << fixed;
// write the solution here
i64 n, k;
scanf("%ld%ld", &n, &k);
cout << n << " " << k << endl;
exit(0);
i64 m = std::sqrt(k);
if (su(m-1) < k && su(m) >= k)
m = m-1;
if (su(m) < k && su(m+1) >= k)
m = m;
if (su(m+1) < k && su(m+2) >= k)
m = m+1;
// n*(n+1)/2 <= k;
// n(n+1) <= 2k
//i64 m = find(0, k, k);
int l = k - su(m) - 1;
forn(i, n){
scanf("%d", &a);
if (i == l){
printf("%d\n", a);
break;;
}
}
#ifdef LOCAL_DEBUG
cerr << "Time elapsed: " << 1.0 * clock() / CLOCKS_PER_SEC << " s." << endl;
#endif
return 0;
}
LyogZysrIC1PMiAtc3RkPWMrKzExICovCgovKiBpbnB1dC9vdXRwdXQgc3RyZWFtcyBhbmQgZm9ybWF0dGluZyAqLwoJI2luY2x1ZGUgPGlvc3RyZWFtPgoJI2luY2x1ZGUgPGNzdGRpbz4KCSNpbmNsdWRlIDxzc3RyZWFtPgoJI2luY2x1ZGUgPGlvbWFuaXA+CgovKiBkYXRhIHN0cnVjdHVyZXMgKi8KCSNpbmNsdWRlIDx2ZWN0b3I+CgkjaW5jbHVkZSA8bWFwPgoJI2luY2x1ZGUgPHN0YWNrPgoJI2luY2x1ZGUgPHF1ZXVlPgoJI2luY2x1ZGUgPGRlcXVlPgoJI2luY2x1ZGUgPHNldD4KCSNpbmNsdWRlIDxiaXRzZXQ+CgkjaW5jbHVkZSA8dW5vcmRlcmVkX21hcD4JCgovKiB1c2VmdWwgbGlicyAqLwoJI2luY2x1ZGUgPGNzdHJpbmc+CgkjaW5jbHVkZSA8Y3N0ZGxpYj4KCSNpbmNsdWRlIDxhbGdvcml0aG0+CgkjaW5jbHVkZSA8Y21hdGg+CiNpZmRlZiBMT0NBTF9ERUJVRwoJI2luY2x1ZGUgPGN0aW1lPgojZW5kaWYKCi8qIGRvbid0IHVzZSB0aGlzIHNoaXQgaW4geW91ciBwcm9qZWN0cywgCiAqIGl0J3Mgb25seSB1c2VmdWwgaW4gb2x5bXBpYWRzICEgCiAqLwoJdXNpbmcgbmFtZXNwYWNlIHN0ZDsKCi8qIHNvbWUgdXNlZnVsIGRlZmluZXMgKi8KCSNkZWZpbmUgZmkgZmlyc3QKCSNkZW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