import sys

r = [0]*100000

n,k = [int(x) for x in sys.stdin.readline().split()]

for i in range(n):

	a, b = [int(x) for x in sys.stdin.readline().split()]

	r[a-1] += b

c = 0

for i,j in enumerate(r):

	c += j

	if c >= k:

		print((i+1))

		break
import sys

r = [0]*(100000+1)

n,k = [int(x) for x in sys.stdin.readline().split()]

for i in range(n):

	a, b = [int(x) for x in sys.stdin.readline().split()]

	r[a] += b

c = 0

for i,j in enumerate(r):

	c += j

	if c >= k:

		print(i)

		break
import sys

r = [0] * 100000
n, k = [int(x) for x in sys.stdin.readline().split()]
for i in range(n):
    a, b = [int(x) for x in sys.stdin.readline().split()]
    r[a - 1] += b
c = 0
for i, j in enumerate(r):
    c += j
    if c >= k:
        print((i + 1))
        break

import sys

r = [0] * (100000 + 1)
n, k = [int(x) for x in sys.stdin.readline().split()]
for i in range(n):
    a, b = [int(x) for x in sys.stdin.readline().split()]
    r[a] += b
c = 0
for i, j in enumerate(r):
    c += j
    if c >= k:
        print(i)
        break

-r = [0] * 100000 +r = [0] * (100000 + 1) -    r[a - 1] += b +    r[a] += b -        print((i + 1)) +        print(i)