f=lambda:list(map(int,input().split()));n,k=f();c=0

for a,b in sorted(list(f())for _ in[0]*n):

  c+=b

  if c>=k:print(a);break
n,k,*l=list(map(int,open(0).read().split()));c=0

for a,b in sorted(zip(l[::2],l[1::2])):

  c+=b

  if c>=k:print(a);break
f = lambda: list(map(int, input().split()))
n, k = f()
c = 0
for a, b in sorted(list(f()) for _ in [0] * n):
    c += b
    if c >= k:
        print(a)
        break

n, k, *l = list(map(int, open(0).read().split()))
c = 0
for a, b in sorted(zip(l[::2], l[1::2])):
    c += b
    if c >= k:
        print(a)
        break

-f = lambda: list(map(int, input().split())) -n, k = f() +n, k, *l = list(map(int, open(0).read().split())) -for a, b in sorted(list(f()) for _ in [0] * n): +for a, b in sorted(zip(l[::2], l[1::2])):