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



lst = [[int(i) for i in input().split()] for _ in range(n)]



lst.sort(key = lambda x: x[0])



for [i, j] in lst:

    if j >= k:

        print(i)

        quit()

    else:

        k -= j
import sys

input = sys.stdin.readline

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

lst = [[int(i) for i in input().split()] for _ in range(n)]

lst.sort(key = lambda x: x[0])



for [i, j] in lst:

    if j >= k:

        print(i)

        quit()

    else:

        k -= j
n, k = list(map(int, input().split()))
lst = [[int(i) for i in input().split()] for _ in range(n)]
lst.sort(key=lambda x: x[0])
for [i, j] in lst:
    if j >= k:
        print(i)
        quit()
    else:
        k -= j

import sys

input = sys.stdin.readline
n, k = list(map(int, input().split()))
lst = [[int(i) for i in input().split()] for _ in range(n)]
lst.sort(key=lambda x: x[0])
for [i, j] in lst:
    if j >= k:
        print(i)
        quit()
    else:
        k -= j

+import sys + +input = sys.stdin.readline