inp = require('fs').readFileSync('/dev/stdin', 'utf8').trim().split('\n')
l = inp.shift().split(' ')
N = l.shift() * 1
K = l.shift() * 1 
s = inp.map(x => x.split(' ')).sort((a,b) => {
    return a[0] - b[0]
})
c = 0
i = 0
while (c < K) {
    c+= s[i][1] * 1
    last = s[i][0]
    i++
}
console.log(last)