object Main {

  def main(args: Array[String]): Unit = {
    import scala.io.StdIn._
    val Array(n, k) = readLine().split(" ").map(_.toInt)
    val m = scala.collection.mutable.SortedMap[Int, Int]()

    (0 until n).map(_ => {
      val Array(a, b) = readLine().split(" ").map(_.toInt)
      (a, b)
    }).foreach { case (a, b) =>
      val v = m.getOrElseUpdate(a, 0)
      m.update(a, v + b)
    }

    var c = 0
    m.foreach { case (key, value) =>
      c += value
      if (c >= k) {
        println(key)
        return
      }
    }

  }

}