def resolve():

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

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

	for i in range(n):

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

		arr[a] += b

	for i in range(len(arr)):

		if arr[i] >= k:

			print(i)

			break

		k -= arr[i]

resolve()
def resolve():

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

	B = [0]*10**5

	for _ in range(n):

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

		B[a-1] += b

	cnt = 0

	for i in range(len(B)):

		cnt += B[i]

		if cnt >= k:

			print((i+1))

			break

resolve()
def resolve():
    n, k = list(map(int, input().split()))
    arr = [0] * (10**5 + 1)
    for i in range(n):
        a, b = list(map(int, input().split()))
        arr[a] += b
    for i in range(len(arr)):
        if arr[i] >= k:
            print(i)
            break
        k -= arr[i]


resolve()

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


resolve()

-    arr = [0] * (10**5 + 1) -    for i in range(n): +    B = [0] * 10**5 +    for _ in range(n): -        arr[a] += b -    for i in range(len(arr)): -        if arr[i] >= k: -            print(i) +        B[a - 1] += b +    cnt = 0 +    for i in range(len(B)): +        cnt += B[i] +        if cnt >= k: +            print((i + 1)) -        k -= arr[i]