import std.stdio, std.string, std.range, std.algorithm, std.math, std.typecons, std.conv;

void main() {
  long N, K;
  readf("%d %d\n", &N, &K);
  ulong[] cnt = new ulong[100000];
  foreach (i; 0..N) {
    long a, b;
    readf("%d %d\n", &a, &b);
    a--;
    cnt[a] += b;
  }
  foreach (i; 1..cnt.length) {
    cnt[i] += cnt[i-1];
  }
  writeln(search(cnt, K, 0, cast(long)cnt.length-1)+1);
}

long search(ulong[] a, long K, long min, long max) {
  if (min + 1 == max && a[min] < K && a[max] >= K) return max;
  if (min == 0 && a[min] >= K) return min;
  long c = (min + max) / 2;
  if (a[c] < K) return search(a, K, c, max);
  return search(a, K, min, c);
}
