function Main(input) {
	var N = parseInt(input.split("\n")[0].split(" ")[0]);
    var K = parseInt(input.split("\n")[0].split(" ")[1]);
  var count = 1;
  var output = "";
  while(K > 0){
    output = input.split("\n")[count].split(" ")[0];
    K = K - parseInt(input.split("\n")[count].split(" ")[1]);
    count++;
  }
  console.log(output);
}

Main(require("fs").readFileSync("/dev/stdin", "utf8"));
