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



a=[]

for i in range(n):

    ai,bi=list(map(int,input().split()))

    a.append([ai,bi])

    

a.sort()



sumb=0

for i in range(n):

    sumb=sumb+a[i][1]

    if sumb>=k:

        print((a[i][0]))

        break

    



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

cnt=[0]*100001



for i in range(n):

    ai,bi=list(map(int,input().split()))

    cnt[ai]+=bi

    

for ans in range(1,len(cnt)):

    if cnt[ans]>=k:

        print(ans)

        break

    k-=cnt[ans]
n, k = list(map(int, input().split()))
a = []
for i in range(n):
    ai, bi = list(map(int, input().split()))
    a.append([ai, bi])
a.sort()
sumb = 0
for i in range(n):
    sumb = sumb + a[i][1]
    if sumb >= k:
        print((a[i][0]))
        break

n, k = list(map(int, input().split()))
cnt = [0] * 100001
for i in range(n):
    ai, bi = list(map(int, input().split()))
    cnt[ai] += bi
for ans in range(1, len(cnt)):
    if cnt[ans] >= k:
        print(ans)
        break
    k -= cnt[ans]

-a = [] +cnt = [0] * 100001 -    a.append([ai, bi]) -a.sort() -sumb = 0 -for i in range(n): -    sumb = sumb + a[i][1] -    if sumb >= k: -        print((a[i][0])) +    cnt[ai] += bi +for ans in range(1, len(cnt)): +    if cnt[ans] >= k: +        print(ans) +    k -= cnt[ans]