import itertools

import math

import string

import collections

from collections import Counter

from collections import deque

from operator import itemgetter

import sys

sys.setrecursionlimit(2*10**5)

INF = 2**60





def readints():

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





def nCr(n, r):

    return math.factorial(n)//(math.factorial(n-r)*math.factorial(r))





def has_duplicates2(seq):

    seen = []

    for item in seq:

        if not(item in seen):

            seen.append(item)

    return len(seq) != len(seen)





def divisor(n):

    divisor = []

    for i in range(1, n+1):

        if n % i == 0:

            divisor.append(i)

    return divisor





# coordinates

dx = [-1, -1, -1, 0, 0, 1, 1, 1]

dy = [-1, 0, 1, -1, 1, -1, 0, 1]



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

ab = [readints() for _ in range(n)]

# print(ab)

abab = sorted(ab)

# print(abab)

tmp = 0

for i in range(n):

    tmp += abab[i][1]

    if tmp >= k:

        print((abab[i][0]))

        break

import math

import string

import collections

from collections import Counter

from collections import deque

from decimal import Decimal

import sys

import fractions





def readints():

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





def nCr(n, r):

    return math.factorial(n)//(math.factorial(n-r)*math.factorial(r))





def has_duplicates2(seq):

    seen = []

    for item in seq:

        if not(item in seen):

            seen.append(item)

    return len(seq) != len(seen)





def divisor(n):

    divisor = []

    for i in range(1, n+1):

        if n % i == 0:

            divisor.append(i)

    return divisor





# coordinates

dx = [-1, -1, -1, 0, 0, 1, 1, 1]

dy = [-1, 0, 1, -1, 1, -1, 0, 1]

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

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

for i in range(n):

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

    x[a] += b

y = 0

for i in range(len(x)):

    y += x[i]

    if y >= k:

        print(i)

        exit()

import itertools
import math
import string
import collections
from collections import Counter
from collections import deque
from operator import itemgetter
import sys

sys.setrecursionlimit(2 * 10**5)
INF = 2**60


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


def nCr(n, r):
    return math.factorial(n) // (math.factorial(n - r) * math.factorial(r))


def has_duplicates2(seq):
    seen = []
    for item in seq:
        if not (item in seen):
            seen.append(item)
    return len(seq) != len(seen)


def divisor(n):
    divisor = []
    for i in range(1, n + 1):
        if n % i == 0:
            divisor.append(i)
    return divisor


# coordinates
dx = [-1, -1, -1, 0, 0, 1, 1, 1]
dy = [-1, 0, 1, -1, 1, -1, 0, 1]
n, k = list(map(int, input().split()))
ab = [readints() for _ in range(n)]
# print(ab)
abab = sorted(ab)
# print(abab)
tmp = 0
for i in range(n):
    tmp += abab[i][1]
    if tmp >= k:
        print((abab[i][0]))
        break

import math
import string
import collections
from collections import Counter
from collections import deque
from decimal import Decimal
import sys
import fractions


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


def nCr(n, r):
    return math.factorial(n) // (math.factorial(n - r) * math.factorial(r))


def has_duplicates2(seq):
    seen = []
    for item in seq:
        if not (item in seen):
            seen.append(item)
    return len(seq) != len(seen)


def divisor(n):
    divisor = []
    for i in range(1, n + 1):
        if n % i == 0:
            divisor.append(i)
    return divisor


# coordinates
dx = [-1, -1, -1, 0, 0, 1, 1, 1]
dy = [-1, 0, 1, -1, 1, -1, 0, 1]
n, k = list(map(int, input().split()))
x = [0] * ((10**5) + 1)
for i in range(n):
    a, b = list(map(int, input().split()))
    x[a] += b
y = 0
for i in range(len(x)):
    y += x[i]
    if y >= k:
        print(i)
        exit()

-import itertools -from operator import itemgetter +from decimal import Decimal - -sys.setrecursionlimit(2 * 10**5) -INF = 2**60 +import fractions -ab = [readints() for _ in range(n)] -# print(ab) -abab = sorted(ab) -# print(abab) -tmp = 0 +x = [0] * ((10**5) + 1) -    tmp += abab[i][1] -    if tmp >= k: -        print((abab[i][0])) -        break +    a, b = list(map(int, input().split())) +    x[a] += b +y = 0 +for i in range(len(x)): +    y += x[i] +    if y >= k: +        print(i) +        exit()