# ABC061C - Big Array

import sys

input = sys.stdin.readline



def main():

    n, k = list(map(int, input().rstrip().split()))

    arr = sorted([list(map(int, input().rstrip().split())) for _ in range(n)])

    cur, cnt, ans = 0, 0, 0

    for i, j in arr:

        ans = i

        cnt += j

        if cnt >= k:

            break

    print(ans)





if __name__ == "__main__":

    main()
# ABC061C - Big Array

import sys

input = sys.stdin.readline



def main():

    n, k = list(map(int, input().rstrip().split()))

    arr = [list(map(int, input().rstrip().split())) for _ in range(n)]

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

    for i, j in arr:

        memo[i] += j

    cnt = 0

    for i, j in enumerate(memo):

        cnt += j

        if cnt >= k:

            print(i)

            break





if __name__ == "__main__":

    main()
# ABC061C - Big Array
import sys

input = sys.stdin.readline


def main():
    n, k = list(map(int, input().rstrip().split()))
    arr = sorted([list(map(int, input().rstrip().split())) for _ in range(n)])
    cur, cnt, ans = 0, 0, 0
    for i, j in arr:
        ans = i
        cnt += j
        if cnt >= k:
            break
    print(ans)


if __name__ == "__main__":
    main()

# ABC061C - Big Array
import sys

input = sys.stdin.readline


def main():
    n, k = list(map(int, input().rstrip().split()))
    arr = [list(map(int, input().rstrip().split())) for _ in range(n)]
    memo = [0] * (10**5 + 1)
    for i, j in arr:
        memo[i] += j
    cnt = 0
    for i, j in enumerate(memo):
        cnt += j
        if cnt >= k:
            print(i)
            break


if __name__ == "__main__":
    main()

-    arr = sorted([list(map(int, input().rstrip().split())) for _ in range(n)]) -    cur, cnt, ans = 0, 0, 0 +    arr = [list(map(int, input().rstrip().split())) for _ in range(n)] +    memo = [0] * (10**5 + 1) -        ans = i +        memo[i] += j +    cnt = 0 +    for i, j in enumerate(memo): +            print(i) -    print(ans)