import sys

iN,iK = [int(_) for _ in input().split()]

#aData = [[int(_) for _ in sLine.split()] for sLine in sys.stdin.readlines()]



d = {}

for _ in range(iN):

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

    if a in d:

        d[a] += b

    else:

        d[a] = b

iC = 0

for a in sorted(d.keys()):

    iC += d[a]

    if iK <= iC :

        print(a)

        exit()

import sys

def 解():

    iN,iK = [int(_) for _ in input().split()]

    #aData = [[int(_) for _ in sLine.split()] for sLine in sys.stdin.readlines()]



    d = {}

    for a,b in [[int(_) for _ in sLine.split()] for sLine in sys.stdin.readlines()]:

        if a in d:

            d[a] += b

        else:

            d[a] = b

    iC = 0

    for a in sorted(d.keys()):

        iC += d[a]

        if iK <= iC :

            print(a)

            exit()

解()

import sys

iN, iK = [int(_) for _ in input().split()]
# aData = [[int(_) for _ in sLine.split()] for sLine in sys.stdin.readlines()]
d = {}
for _ in range(iN):
    a, b = [int(_) for _ in sys.stdin.readline().split()]
    if a in d:
        d[a] += b
    else:
        d[a] = b
iC = 0
for a in sorted(d.keys()):
    iC += d[a]
    if iK <= iC:
        print(a)
        exit()

import sys


def 解():
    iN, iK = [int(_) for _ in input().split()]
    # aData = [[int(_) for _ in sLine.split()] for sLine in sys.stdin.readlines()]
    d = {}
    for a, b in [[int(_) for _ in sLine.split()] for sLine in sys.stdin.readlines()]:
        if a in d:
            d[a] += b
        else:
            d[a] = b
    iC = 0
    for a in sorted(d.keys()):
        iC += d[a]
        if iK <= iC:
            print(a)
            exit()


解()

-iN, iK = [int(_) for _ in input().split()] -# aData = [[int(_) for _ in sLine.split()] for sLine in sys.stdin.readlines()] -d = {} -for _ in range(iN): -    a, b = [int(_) for _ in sys.stdin.readline().split()] -    if a in d: -        d[a] += b -    else: -        d[a] = b -iC = 0 -for a in sorted(d.keys()): -    iC += d[a] -    if iK <= iC: -        print(a) -        exit() + +def 解(): +    iN, iK = [int(_) for _ in input().split()] +    # aData = [[int(_) for _ in sLine.split()] for sLine in sys.stdin.readlines()] +    d = {} +    for a, b in [[int(_) for _ in sLine.split()] for sLine in sys.stdin.readlines()]: +        if a in d: +            d[a] += b +        else: +            d[a] = b +    iC = 0 +    for a in sorted(d.keys()): +        iC += d[a] +        if iK <= iC: +            print(a) +            exit() + + +解()