import std.functional,
       std.algorithm,
       std.bigint,
       std.string,
       std.traits,
       std.array,
       std.range,
       std.stdio,
       std.conv;

void main() {
  ulong[] NK = readln.chomp.split.to!(ulong[]);
  ulong N = NK[0],
        K = NK[1];
  ulong[ulong] AB;

  foreach (i; 0..N) {
    ulong[] ab = readln.chomp.split.to!(ulong[]);
    if (ab[0] in AB) {
      AB[ab[0]] += ab[1];
    } else {
      AB[ab[0]] = ab[1];
    }
  }
  ulong[] keys = AB.keys;
  sort!"a<b"(keys);
  ulong k;
  ulong ans;
  foreach (key; keys) {
    if (k <= K && K <= k + AB[key]) {
      ans = key;
      break;
    }
    k += AB[key];
  }
  writeln(ans);
}
