local n,k=io.read("n","n")
local t={}
for i=1,n do
    local a,b=io.read("n","n")
    t[i]={a,b}
end

local counter=0
for i=1,n do
    counter=counter+t[i][2]
    if counter>=k then
        print(t[i][1])
        return
    end
end