import sys

read = sys.stdin.buffer.read

readline = sys.stdin.buffer.readline

readlines = sys.stdin.buffer.readlines

sys.setrecursionlimit(10 ** 7)



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

ab = [list(map(int, readline().split())) for _ in range(n)]

ab.sort()

for a, b in ab:

    if b >= k:

        print(a)

        exit()

    k -= b

import sys

read = sys.stdin.buffer.read

readline = sys.stdin.buffer.readline

readlines = sys.stdin.buffer.readlines

sys.setrecursionlimit(10 ** 7)



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

ab = [tuple(map(int, readline().split())) for _ in range(n)]

ab.sort()

for a, b in ab:

    k -= b

    if k <= 0:

        print(a)

        break

import sys

read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
sys.setrecursionlimit(10**7)
n, k = list(map(int, readline().split()))
ab = [list(map(int, readline().split())) for _ in range(n)]
ab.sort()
for a, b in ab:
    if b >= k:
        print(a)
        exit()
    k -= b

import sys

read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
sys.setrecursionlimit(10**7)
n, k = list(map(int, readline().split()))
ab = [tuple(map(int, readline().split())) for _ in range(n)]
ab.sort()
for a, b in ab:
    k -= b
    if k <= 0:
        print(a)
        break

-ab = [list(map(int, readline().split())) for _ in range(n)] +ab = [tuple(map(int, readline().split())) for _ in range(n)] -    if b >= k: +    k -= b +    if k <= 0: -        exit() -    k -= b +        break