N, K = list(map(int, input().split()))

lst_ab = sorted([tuple(map(int, input().split())) for _ in range(N)])

length = 0





for i in range(N):

    ai, bi = lst_ab[i][0], lst_ab[i][1]

    length += bi

    if length >= K:

        ans = ai

        print(ans)

        break

N, K = list(map(int, input().split()))

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

length = 0





for i in range(N):

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

    lst[ai] += bi



for ai, bi in enumerate(lst):

    length += bi

    if length >= K:

        ans = ai

        print(ans)

        break

N, K = list(map(int, input().split()))
lst_ab = sorted([tuple(map(int, input().split())) for _ in range(N)])
length = 0
for i in range(N):
    ai, bi = lst_ab[i][0], lst_ab[i][1]
    length += bi
    if length >= K:
        ans = ai
        print(ans)
        break

N, K = list(map(int, input().split()))
lst = [0] * (10**5 + 1)
length = 0
for i in range(N):
    ai, bi = list(map(int, input().split()))
    lst[ai] += bi
for ai, bi in enumerate(lst):
    length += bi
    if length >= K:
        ans = ai
        print(ans)
        break

-lst_ab = sorted([tuple(map(int, input().split())) for _ in range(N)]) +lst = [0] * (10**5 + 1) -    ai, bi = lst_ab[i][0], lst_ab[i][1] +    ai, bi = list(map(int, input().split())) +    lst[ai] += bi +for ai, bi in enumerate(lst):