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

arr=[list(map(int,input().split())) for _ in range(n)]

arr=sorted(arr, key=lambda x:x[0])

sum=0

for i in range(n):

  if sum<k<=sum+arr[i][1]:

    print((arr[i][0]))

  sum=sum+arr[i][1]
n,k=list(map(int,input().split()))

cnt=[0]*(10**5+1)

for _ in range(n):

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

  cnt[a]+=b

tmp=0

for i in range(10**5+1):

  tmp+=cnt[i]

  if tmp>=k:

    print(i)

    break
n, k = list(map(int, input().split()))
arr = [list(map(int, input().split())) for _ in range(n)]
arr = sorted(arr, key=lambda x: x[0])
sum = 0
for i in range(n):
    if sum < k <= sum + arr[i][1]:
        print((arr[i][0]))
    sum = sum + arr[i][1]

n, k = list(map(int, input().split()))
cnt = [0] * (10**5 + 1)
for _ in range(n):
    a, b = list(map(int, input().split()))
    cnt[a] += b
tmp = 0
for i in range(10**5 + 1):
    tmp += cnt[i]
    if tmp >= k:
        print(i)
        break

-arr = [list(map(int, input().split())) for _ in range(n)] -arr = sorted(arr, key=lambda x: x[0]) -sum = 0 -for i in range(n): -    if sum < k <= sum + arr[i][1]: -        print((arr[i][0])) -    sum = sum + arr[i][1] +cnt = [0] * (10**5 + 1) +for _ in range(n): +    a, b = list(map(int, input().split())) +    cnt[a] += b +tmp = 0 +for i in range(10**5 + 1): +    tmp += cnt[i] +    if tmp >= k: +        print(i) +        break