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 = "";
  var tmpK = 0;
  for(var i = 1; i <= N; i++){
    output = input.split("\n")[i].split(" ")[0];
    tmpK += parseInt(input.split("\n")[i].split(" ")[1]);
    
    if(K >= tmpK){
       break;
       }
  }
  console.log(output);
}

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