#abc061c. [abc061_c]Big Array

[abc061_c]Big Array

Problem Statement

There is an empty array. The following NN operations will be performed to insert integers into the array. In the ii-th operation (1iN)(1≤i≤N), bib_i copies of an integer aia_i are inserted into the array. Find the KK-th smallest integer in the array after the NN operations. For example, the 44-th smallest integer in the array 1,2,2,3,3,3\\{1,2,2,3,3,3\\} is 33.

Constraints

  • 1N1051≤N≤10^5
  • 1ai,bi1051≤a_i,b_i≤10^5
  • 1Kb1+bn1≤K≤b_1…+…b_n
  • All input values are integers.

Input

Input is given from Standard Input in the following format:

NN KK a1a_1 b1b_1 ::
aNa_N bNb_N

Output

Print the KK-th smallest integer in the array after the NN operations.


Sample Input 1

3 4
1 1
2 2
3 3

Sample Output 1

3

The resulting array is the same as the one in the problem statement.


Sample Input 2

10 500000
1 100000
1 100000
1 100000
1 100000
1 100000
100000 100000
100000 100000
100000 100000
100000 100000
100000 100000

Sample Output 2

1