/* 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;
}