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

num = 0

q = []

for i in range(n):

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

    q.append((a,b))

q.sort()

for i in range(n):

    a, b = q[i][0], q[i][1]

    num += b

    if num >= k:

        print(a)

        exit()



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

cnt = 0

num = []

for i in range(n):

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

    num.append((a,b))

num.sort()

for i in range(n):

    cnt += num[i][1]

    if cnt >= k:

        print((num[i][0]))

        exit()
n, k = list(map(int, input().split()))
num = 0
q = []
for i in range(n):
    a, b = list(map(int, input().split()))
    q.append((a, b))
q.sort()
for i in range(n):
    a, b = q[i][0], q[i][1]
    num += b
    if num >= k:
        print(a)
        exit()

n, k = list(map(int, input().split()))
cnt = 0
num = []
for i in range(n):
    a, b = list(map(int, input().split()))
    num.append((a, b))
num.sort()
for i in range(n):
    cnt += num[i][1]
    if cnt >= k:
        print((num[i][0]))
        exit()

-num = 0 -q = [] +cnt = 0 +num = [] -    q.append((a, b)) -q.sort() +    num.append((a, b)) +num.sort() -    a, b = q[i][0], q[i][1] -    num += b -    if num >= k: -        print(a) +    cnt += num[i][1] +    if cnt >= k: +        print((num[i][0]))