import java.util.Scanner

object Main extends App {
  val sc = new Scanner(System.in)

  val n = sc.nextInt
  val k = sc.nextLong

  val iAbl = Vector.fill(n)((sc.nextInt, sc.nextInt))

  val abl = iAbl.sorted

  val acc = comulativeSum(abl)

  val res = acc.find(_._2 >= k).get._1

  println(res)

  def comulativeSum(intVector: Vector[(Int, Int)]): Vector[(Int, Long)] ={
    intVector.foldLeft(Vector.empty[(Int, Long)]){
      case (list, (v, acc)) =>
        if(list.isEmpty) Vector((v,acc))
        else list :+ (v, list.last._2 + acc)
    }
  }
}
