log = console.log;

var stdin = require("fs").readFileSync("/dev/stdin", "UTF-8");
var lines = stdin
  .split("\n")
  .filter(v => v !== "")
  .map(v => v.split(" ").map(Number));

var N = lines[0][0];
var K = lines[0][1];
lines = lines.slice(1);
lines.sort((a,b)=> a[0]-b[0])

var i = 0;
var count = 0;
while(count<K){
  if(K<=count+lines[i][1]){
    log(lines[i][0])
    break;
  } else {
    count += lines[i][1]
    i++
  }
}