import scala.util.control.Breaks._

object Main extends App {
  val Array(n, k) = scala.io.StdIn.readLine.split(" ").map(_.toLong)

  val list = List.fill(n.toInt) { scala.io.StdIn.readLine.split(" ").map(_.toLong) }

  val sorted_list = list.sortBy(_.head)

  var count = 0L
  breakable {
    for (i <- sorted_list) {

      if (count + i(1) >= k) {
        println(i.head)
        break
      } else {
        count += i(1)
      }
    }
  }
}
