import scala.collection.mutable.HashMap
import scala.annotation.tailrec

object Main extends App {
  val Array(n, k) = io.StdIn.readLine.split(" ").map(_.toLong)
  val arr = Array.ofDim[Long](100001)
  Iterator.continually(io.StdIn.readLine)
    .take(n.toInt)
    .map(_.split(" "))
    .foreach(e => arr(e(0).toInt) += e(1).toLong)

  def f(arr:Array[Long], k:Long):Int = {

    @tailrec
    def rec(acc:Long, index:Int, k:Long ):Int = {
      val res = acc + arr(index)
      if(res >= k) index
      else rec(res, index+1, k)
    }

    rec(0L, 1, k)
  }

  println(f(arr, k))
}