class struct:

  def __init__(self,a,b):

    self.a=a

    self.b=b

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

l=[]

for i in range(n):

  a,b=list(map(int,input().split()))

  l.append(struct(a,b))

l=sorted(l,key=lambda x:x.a)

s=0

for i in l:

  s+=i.b

  if k<=s:

    print((i.a))

    exit()
import math,string,itertools,fractions,heapq,collections,re,array,bisect,sys,random,time



sys.setrecursionlimit(10**7)

inf=10**20

mod=10**9+7



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

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

def LS(): return input().split()

def S(): return eval(input())



def main():

  n,k=LI()



  l=[]

  for _ in range(n):

    l.append(LI())



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



  sm=0

  for i in range(n):

    sm+=l[i][1]



    if sm>=k:

      return l[i][0]



print((main()))

class struct:
    def __init__(self, a, b):
        self.a = a
        self.b = b


n, k = list(map(int, input().split()))
l = []
for i in range(n):
    a, b = list(map(int, input().split()))
    l.append(struct(a, b))
l = sorted(l, key=lambda x: x.a)
s = 0
for i in l:
    s += i.b
    if k <= s:
        print((i.a))
        exit()

import math, string, itertools, fractions, heapq, collections, re, array, bisect, sys, random, time

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


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


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


def LS():
    return input().split()


def S():
    return eval(input())


def main():
    n, k = LI()
    l = []
    for _ in range(n):
        l.append(LI())
    l = sorted(l, key=lambda x: x[0])
    sm = 0
    for i in range(n):
        sm += l[i][1]
        if sm >= k:
            return l[i][0]


print((main()))

-class struct: -    def __init__(self, a, b): -        self.a = a -        self.b = b +import math, string, itertools, fractions, heapq, collections, re, array, bisect, sys, random, time + +sys.setrecursionlimit(10**7) +inf = 10**20 +mod = 10**9 + 7 -n, k = list(map(int, input().split())) -l = [] -for i in range(n): -    a, b = list(map(int, input().split())) -    l.append(struct(a, b)) -l = sorted(l, key=lambda x: x.a) -s = 0 -for i in l: -    s += i.b -    if k <= s: -        print((i.a)) -        exit() +def LI(): +    return list(map(int, input().split())) + + +def I(): +    return int(eval(input())) + + +def LS(): +    return input().split() + + +def S(): +    return eval(input()) + + +def main(): +    n, k = LI() +    l = [] +    for _ in range(n): +        l.append(LI()) +    l = sorted(l, key=lambda x: x[0]) +    sm = 0 +    for i in range(n): +        sm += l[i][1] +        if sm >= k: +            return l[i][0] + + +print((main()))