function main(input) {
    var n, k, a, b, tmp, i, m = new Map(), keys=[], size, cnt = 0;
    tmp = input[0].split(" ");
    n = parseInt(tmp[0], 10);
    k = parseInt(tmp[1], 10);

    for (i = 0; i < n; i++) {
        tmp = input[1+i].split(" ");
        a = (parseInt(tmp[0], 10));
        b = (parseInt(tmp[1], 10));
        if(m.has(a)){
            m.set(a, m.get(a)+b);
        }else{
            m.set(a, b);
            keys.push(a);
        }
    }

    size = keys.length;
    keys.sort(function (self, other) {
        if (self < other) {
            return -1;
        } else if (self > other) {
            return 1;
        } else {
            return 0;
        }
    });
    for (i = 0; i < size; i++) {
        cnt += m.get(keys[i]);
        if(cnt >= k){
            console.log(keys[i]);
            break;
        }
    }
}

main(require("fs").readFileSync("/dev/stdin", "utf8").split("\n"));