def main():

    N, K = (int(i) for i in input().split())

    A = []

    B = []

    from bisect import bisect_left

    AB = [[int(i) for i in input().split()] for j in range(N)]

    AB.sort()

    A = [a[0] for a in AB]

    B = [a[1] for a in AB]

    from itertools import accumulate

    B = list(accumulate(B))

    idx = bisect_left(B, K)

    # print(A, B, idx)

    print((A[idx]))





if __name__ == '__main__':

    main()

def main():

    import sys

    input = sys.stdin.buffer.readline

    N, K = (int(i) for i in input().split())

    AB = [[int(i) for i in input().split()] for j in range(N)]

    AB.sort()

    cur = 0

    for a, b in AB:

        if cur+b < K:

            cur += b

            continue

        else:

            return print(a)





if __name__ == '__main__':

    main()

def main():
    N, K = (int(i) for i in input().split())
    A = []
    B = []
    from bisect import bisect_left

    AB = [[int(i) for i in input().split()] for j in range(N)]
    AB.sort()
    A = [a[0] for a in AB]
    B = [a[1] for a in AB]
    from itertools import accumulate

    B = list(accumulate(B))
    idx = bisect_left(B, K)
    # print(A, B, idx)
    print((A[idx]))


if __name__ == "__main__":
    main()

def main():
    import sys

    input = sys.stdin.buffer.readline
    N, K = (int(i) for i in input().split())
    AB = [[int(i) for i in input().split()] for j in range(N)]
    AB.sort()
    cur = 0
    for a, b in AB:
        if cur + b < K:
            cur += b
            continue
        else:
            return print(a)


if __name__ == "__main__":
    main()

+    import sys + +    input = sys.stdin.buffer.readline -    A = [] -    B = [] -    from bisect import bisect_left - -    A = [a[0] for a in AB] -    B = [a[1] for a in AB] -    from itertools import accumulate - -    B = list(accumulate(B)) -    idx = bisect_left(B, K) -    # print(A, B, idx) -    print((A[idx])) +    cur = 0 +    for a, b in AB: +        if cur + b < K: +            cur += b +            continue +        else: +            return print(a)