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

    int index = 1;
    int result;
    foreach (i; 0 .. n)
    {
        tmp = readln.split.to!(int[]);
        int a = tmp[0], b = tmp[1];

        if (index <= k && k < index + b)
        {
            result = a;
        }
        index += b;
    }

    result.writeln;
}

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;