void main()
{
    long[] tmp = readln.split.to!(long[]);
    long n = tmp[0], k = tmp[1];

    long[] lists = new long[10^^5+1];
    foreach (i; 0 .. n)
    {
        tmp = readln.split.to!(long[]);
        long a = tmp[0], b = tmp[1];
        lists[a] += b;
    }

    long num = 1;
    foreach (i, x; lists)
    {
        if (num <= k && k < num + x)
        {
            i.writeln;
            break;
        }

        num += x;
    }
}


import std.stdio;
import std.string;
import std.array;
import std.conv;
import std.algorithm;
import std.range;
import std.math;
import std.numeric;
import std.container;
import std.typecons;
import std.ascii;
import std.uni;