import java.io.{BufferedOutputStream, BufferedReader, InputStreamReader, PrintWriter}

import scala.annotation.tailrec

object Main {
  def main(args: Array[String]): Unit = {
    val in = new BufferedReader(new InputStreamReader(System.in))
    val out = new PrintWriter(new BufferedOutputStream(System.out))
    val (n, k) = in.readLine().split("\\s+") match {
      case Array(n, k) => (n.toInt, k.toLong)
    }

    val abs = List.fill(n)(
      in.readLine().split("\\s+").map(_.toInt) match {
        case Array(a, b) => (a, b)
      }
    ).sortBy(_._1)

    @tailrec
    def find(k: Long, abs: List[(Int, Int)]): Int = {
      val (a, b) = abs.head
      if (k <= b) {
        a
      } else {
        find(k - b, abs.tail)
      }
    }

    out.println(find(k, abs))

    out.flush()
  }
}
