import sys

import bisect



N, K = list(map(int, sys.stdin.readline().split()))

d = []





for i in range(N):

    a, b = list(map(int, sys.stdin.readline().split()))

    d.append([a,b])



d.sort()



l = [0] * N

l[0] = d[0][1]



for i in range(1, N):

    l[i] = d[i][1]+ l[i-1]



pos = bisect.bisect_left(l, K)

print((d[pos][0]))
import sys

d = [0] * 10**5

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()]

    d[a-1] += b

    

cnt = 0



for i, j in enumerate(d):

    cnt += j

    if cnt >= K:

        print((i+1))

        break
import sys
import bisect

N, K = list(map(int, sys.stdin.readline().split()))
d = []
for i in range(N):
    a, b = list(map(int, sys.stdin.readline().split()))
    d.append([a, b])
d.sort()
l = [0] * N
l[0] = d[0][1]
for i in range(1, N):
    l[i] = d[i][1] + l[i - 1]
pos = bisect.bisect_left(l, K)
print((d[pos][0]))

import sys

d = [0] * 10**5
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()]
    d[a - 1] += b
cnt = 0
for i, j in enumerate(d):
    cnt += j
    if cnt >= K:
        print((i + 1))
        break

-import bisect -N, K = list(map(int, sys.stdin.readline().split())) -d = [] +d = [0] * 10**5 +N, K = [int(x) for x in sys.stdin.readline().split()] -    a, b = list(map(int, sys.stdin.readline().split())) -    d.append([a, b]) -d.sort() -l = [0] * N -l[0] = d[0][1] -for i in range(1, N): -    l[i] = d[i][1] + l[i - 1] -pos = bisect.bisect_left(l, K) -print((d[pos][0])) +    a, b = [int(x) for x in sys.stdin.readline().split()] +    d[a - 1] += b +cnt = 0 +for i, j in enumerate(d): +    cnt += j +    if cnt >= K: +        print((i + 1)) +        break