fun main(args: Array<String>) {
    abc061c()
}

fun abc061c() {
    val (n, k) = readLine()!!.split(" ").map { it.toLong() }
    val inputs = (1..n).map { readLine()!!.split(" ").map { it.toLong() } }
        .map { Input(it[0], it[1]) }
        .sortedBy { it.value }

    var remainCount = k
    for (input in inputs) {
        if (input.time >= remainCount) {
            return println(input.value)
        } else {
            remainCount -= input.time
        }
    }
}

private data class Input(val value: Long, val time: Long)
