n, k = list(map(int, input().split()))



lis = []

max_num = 0

for i in range(n):

    array = list(map(int, input().split()))

    if array[0] > max_num:

        max_num = array[0]

    lis.append(array)



num_list = [0] * max_num



for i, j in lis:

    num_list[i-1] += j



count = 0

for i in range(len(num_list)):

    count += num_list[i]

    if count >= k:

        print((i+1))

        exit()
from collections import defaultdict





n, k = list(map(int, input().split()))



cnt = 0

d = defaultdict(int)

for i in range(n):

    a, b = list(map(int, input().split()))

    d[a] += b



d = sorted(d.items())



for i, j in d:

    cnt += j

    if cnt >= k:

        print(i)

        break



n, k = list(map(int, input().split()))
lis = []
max_num = 0
for i in range(n):
    array = list(map(int, input().split()))
    if array[0] > max_num:
        max_num = array[0]
    lis.append(array)
num_list = [0] * max_num
for i, j in lis:
    num_list[i - 1] += j
count = 0
for i in range(len(num_list)):
    count += num_list[i]
    if count >= k:
        print((i + 1))
        exit()

from collections import defaultdict

n, k = list(map(int, input().split()))
cnt = 0
d = defaultdict(int)
for i in range(n):
    a, b = list(map(int, input().split()))
    d[a] += b
d = sorted(d.items())
for i, j in d:
    cnt += j
    if cnt >= k:
        print(i)
        break

+from collections import defaultdict + -lis = [] -max_num = 0 +cnt = 0 +d = defaultdict(int) -    array = list(map(int, input().split())) -    if array[0] > max_num: -        max_num = array[0] -    lis.append(array) -num_list = [0] * max_num -for i, j in lis: -    num_list[i - 1] += j -count = 0 -for i in range(len(num_list)): -    count += num_list[i] -    if count >= k: -        print((i + 1)) -        exit() +    a, b = list(map(int, input().split())) +    d[a] += b +d = sorted(d.items()) +for i, j in d: +    cnt += j +    if cnt >= k: +        print(i) +        break