N,K = list(map(int,input().split()))

AB = []

for i in range(N):

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

    AB.append((a,b))



AB.sort()



cnt = 0

for ab in AB:

    a,b = ab

    cnt += b

    if cnt >= K:

        print(a)

        break

# atcoder : python3 (3.4.3)

import sys

input = sys.stdin.readline

sys.setrecursionlimit(10**6)

mod = 10**9+7



# main

N,K = list(map(int,input().split()))

AB = [list(map(int,input().split())) for _ in range(N)]



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

for a,b in AB:

    Cnt[a] += b



i = 1

for ci in range(len(Cnt)):

    if i <= K < i+Cnt[ci]:

        print(ci)

        sys.exit()

    else:

        i += Cnt[ci]
N, K = list(map(int, input().split()))
AB = []
for i in range(N):
    a, b = list(map(int, input().split()))
    AB.append((a, b))
AB.sort()
cnt = 0
for ab in AB:
    a, b = ab
    cnt += b
    if cnt >= K:
        print(a)
        break

# atcoder : python3 (3.4.3)
import sys

input = sys.stdin.readline
sys.setrecursionlimit(10**6)
mod = 10**9 + 7
# main
N, K = list(map(int, input().split()))
AB = [list(map(int, input().split())) for _ in range(N)]
Cnt = [0] * (10**5 + 1)
for a, b in AB:
    Cnt[a] += b
i = 1
for ci in range(len(Cnt)):
    if i <= K < i + Cnt[ci]:
        print(ci)
        sys.exit()
    else:
        i += Cnt[ci]

+# atcoder : python3 (3.4.3) +import sys + +input = sys.stdin.readline +sys.setrecursionlimit(10**6) +mod = 10**9 + 7 +# main -AB = [] -for i in range(N): -    a, b = list(map(int, input().split())) -    AB.append((a, b)) -AB.sort() -cnt = 0 -for ab in AB: -    a, b = ab -    cnt += b -    if cnt >= K: -        print(a) -        break +AB = [list(map(int, input().split())) for _ in range(N)] +Cnt = [0] * (10**5 + 1) +for a, b in AB: +    Cnt[a] += b +i = 1 +for ci in range(len(Cnt)): +    if i <= K < i + Cnt[ci]: +        print(ci) +        sys.exit() +    else: +        i += Cnt[ci]