from statistics import median

#import collections

#aa = collections.Counter(a) # list to list || .most_common(2)で最大の2個とりだせるお a[0][0]

from fractions import gcd

from itertools import combinations # (string,3) 3回

from collections import deque

from collections import defaultdict

import bisect

#

#    d = m - k[i] - k[j]

#    if kk[bisect.bisect_right(kk,d) - 1] == d:

#

#

#

# pythonで無理なときは、pypyでやると正解するかも！！

#

#



import sys

sys.setrecursionlimit(10000000)

mod = 10**9 + 7



def readInts():

  return list(map(int,input().split()))



def main():

    n,k = readInts()

    sum_ = 0

    l = []

    for i in range(n):

        a,b = readInts()

        l.append([a,b])

    l = sorted(l,key = lambda x:x[0])

    for a,b in l:

        sum_ += b

        if sum_ >= k:

            print(a)

            exit()





if __name__ == '__main__':

  main()

#from statistics import median

#import collections

#aa = collections.Counter(a) # list to list || .most_common(2)で最大の2個とりだせるお a[0][0]

from fractions import gcd

from itertools import combinations,permutations,accumulate # (string,3) 3回

#from collections import deque

from collections import deque,defaultdict,Counter

import decimal

import re

#import bisect

#

#    d = m - k[i] - k[j]

#    if kk[bisect.bisect_right(kk,d) - 1] == d:

#

#

#

# pythonで無理なときは、pypyでやると正解するかも！！

#

#



import sys

sys.setrecursionlimit(10000000)

mod = 10**9 + 7

#mod = 9982443453

def readInts():

  return list(map(int,input().split()))

def I():

  return int(eval(input()))

n,k = readInts()

dic = defaultdict(int)

d = set()

for i in range(n):

    a,b = readInts()

    d.add(a)

    dic[a] += b

d = sorted(list(d))

ans = 0

for v in d:

    if ans + dic[v] >= k:

        print(v)

        exit()

    ans += dic[v]

from statistics import median

# import collections
# aa = collections.Counter(a) # list to list || .most_common(2)で最大の2個とりだせるお a[0][0]
from fractions import gcd
from itertools import combinations  # (string,3) 3回
from collections import deque
from collections import defaultdict
import bisect

#
#    d = m - k[i] - k[j]
#    if kk[bisect.bisect_right(kk,d) - 1] == d:
#
#
#
# pythonで無理なときは、pypyでやると正解するかも！！
#
#
import sys

sys.setrecursionlimit(10000000)
mod = 10**9 + 7


def readInts():
    return list(map(int, input().split()))


def main():
    n, k = readInts()
    sum_ = 0
    l = []
    for i in range(n):
        a, b = readInts()
        l.append([a, b])
    l = sorted(l, key=lambda x: x[0])
    for a, b in l:
        sum_ += b
        if sum_ >= k:
            print(a)
            exit()


if __name__ == "__main__":
    main()

# from statistics import median
# import collections
# aa = collections.Counter(a) # list to list || .most_common(2)で最大の2個とりだせるお a[0][0]
from fractions import gcd
from itertools import combinations, permutations, accumulate  # (string,3) 3回

# from collections import deque
from collections import deque, defaultdict, Counter
import decimal
import re

# import bisect
#
#    d = m - k[i] - k[j]
#    if kk[bisect.bisect_right(kk,d) - 1] == d:
#
#
#
# pythonで無理なときは、pypyでやると正解するかも！！
#
#
import sys

sys.setrecursionlimit(10000000)
mod = 10**9 + 7
# mod = 9982443453
def readInts():
    return list(map(int, input().split()))


def I():
    return int(eval(input()))


n, k = readInts()
dic = defaultdict(int)
d = set()
for i in range(n):
    a, b = readInts()
    d.add(a)
    dic[a] += b
d = sorted(list(d))
ans = 0
for v in d:
    if ans + dic[v] >= k:
        print(v)
        exit()
    ans += dic[v]

-from statistics import median - +# from statistics import median -from itertools import combinations  # (string,3) 3回 -from collections import deque -from collections import defaultdict -import bisect +from itertools import combinations, permutations, accumulate  # (string,3) 3回 +# from collections import deque +from collections import deque, defaultdict, Counter +import decimal +import re + +# import bisect - - +# mod = 9982443453 -def main(): -    n, k = readInts() -    sum_ = 0 -    l = [] -    for i in range(n): -        a, b = readInts() -        l.append([a, b]) -    l = sorted(l, key=lambda x: x[0]) -    for a, b in l: -        sum_ += b -        if sum_ >= k: -            print(a) -            exit() +def I(): +    return int(eval(input())) -if __name__ == "__main__": -    main() +n, k = readInts() +dic = defaultdict(int) +d = set() +for i in range(n): +    a, b = readInts() +    d.add(a) +    dic[a] += b +d = sorted(list(d)) +ans = 0 +for v in d: +    if ans + dic[v] >= k: +        print(v) +        exit() +    ans += dic[v]