import sys

import numpy as np

import collections

n,k = [int(x) for x in sys.stdin.readline().split()]

r = collections.defaultdict(int)

for i in range(n):

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

	r[a] += b

d = sorted(r.items())

c = 0

for i,j in enumerate(d):

	c += j[1]

	if c >= k:

		print((int(j[0])))

		break
import sys

r = [0]*100000

n,k = [int(x) for x in sys.stdin.readline().split()]

for i in range(n):

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

	r[a-1] += b

c = 0

for i,j in enumerate(r):

	c += j

	if c >= k:

		print((i+1))

		break
import sys
import numpy as np
import collections

n, k = [int(x) for x in sys.stdin.readline().split()]
r = collections.defaultdict(int)
for i in range(n):
    a, b = [int(x) for x in sys.stdin.readline().split()]
    r[a] += b
d = sorted(r.items())
c = 0
for i, j in enumerate(d):
    c += j[1]
    if c >= k:
        print((int(j[0])))
        break

import sys

r = [0] * 100000
n, k = [int(x) for x in sys.stdin.readline().split()]
for i in range(n):
    a, b = [int(x) for x in sys.stdin.readline().split()]
    r[a - 1] += b
c = 0
for i, j in enumerate(r):
    c += j
    if c >= k:
        print((i + 1))
        break

-import numpy as np -import collections +r = [0] * 100000 -r = collections.defaultdict(int) -    r[a] += b -d = sorted(r.items()) +    r[a - 1] += b -for i, j in enumerate(d): -    c += j[1] +for i, j in enumerate(r): +    c += j -        print((int(j[0]))) +        print((i + 1))