# 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

    while cnt < k:

        cnt += arr[cur][1]

        ans = arr[cur][0]

        cur += 1

    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 = 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 = sorted([list(map(int, input().rstrip().split())) for _ in range(n)])
    cur, cnt, ans = 0, 0, 0
    while cnt < k:
        cnt += arr[cur][1]
        ans = arr[cur][0]
        cur += 1
    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 = 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()

-    while cnt < k: -        cnt += arr[cur][1] -        ans = arr[cur][0] -        cur += 1 +    for i, j in arr: +        ans = i +        cnt += j +        if cnt >= k: +            break