#!/usr/bin/env python3

(n, k), *q = [[*list(map(int, i.split()))] for i in open(0)]

q.sort()

for a, b in q:

    k -= b

    if k <= 0:

        print(a)

        break

#!/usr/bin/env python3

(n, k), *q = [[*list(map(int, i.split()))] for i in open(0)]

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

for a, b in q:

    bucket[a] += b

for n, i in enumerate(bucket):

    k -= i

    if k <= 0:

        print(n)

        break

#!/usr/bin/env python3
(n, k), *q = [[*list(map(int, i.split()))] for i in open(0)]
q.sort()
for a, b in q:
    k -= b
    if k <= 0:
        print(a)
        break

#!/usr/bin/env python3
(n, k), *q = [[*list(map(int, i.split()))] for i in open(0)]
bucket = [0] * (10**5 + 1)
for a, b in q:
    bucket[a] += b
for n, i in enumerate(bucket):
    k -= i
    if k <= 0:
        print(n)
        break

-q.sort() +bucket = [0] * (10**5 + 1) -    k -= b +    bucket[a] += b +for n, i in enumerate(bucket): +    k -= i -        print(a) +        print(n)