Problem:
Score : 200 points

Problem Statement

When Mr. X is away from home, he has decided to use his smartwatch to search the best route to go back home, to participate in ABC.

You, the smartwatch, has found N routes to his home.

If Mr. X uses the i-th of these routes, he will get home in time t_i at cost c_i.

Find the smallest cost of a route that takes not longer than time T.

Constraints

All values in input are integers.

1 \leq N \leq 100

1 \leq T \leq 1000

1 \leq c_i \leq 1000

1 \leq t_i \leq 1000

The pairs (c_i, t_i) are distinct.

Input

Input is given from Standard Input in the following format:

N T
c_1 t_1
c_2 t_2
:
c_N t_N

Output

Print the smallest cost of a route that takes not longer than time T.

If there is no route that takes not longer than time T, print TLE instead.

Sample Input 1

3 70
7 60
1 80
4 50

Sample Output 1

4

The first route gets him home at cost 7.

The second route takes longer than time T = 70.

The third route gets him home at cost 4.

Thus, the cost 4 of the third route is the minimum.

Sample Input 2

4 3
1 1000
2 4
3 1000
4 500

Sample Output 2

TLE

There is no route that takes not longer than time T = 3.

Sample Input 3

5 9
25 8
5 9
4 10
1000 1000
6 1

Sample Output 3

5

Solution in C# (Mono 4.6.2.0) (judge verdict: Accepted)

using System;
using System.Collections.Generic;
using System.Linq;
using System.IO;
using System.Text;
using System.Runtime.CompilerServices;
using System.Xml;
using static System.Console;
using static System.Math;
using static Ex;
using static Util;
using static IO_Z;

class AC
{

    /*------------------------------------------------------------------*/

    void Solve()
    {
        int N, T;
        int[] c, t;
        I(out N, out T);
        I(out c, out t, N);

        var tup = ZIP(c, t).Where(x => x.Item2 <= T);

        IF(!tup.Any(),
           () => "TLE",
           () => tup.Select(x => x.Item1).Min().ToString())
            .Prt(); 
        
    }

    /*------------------------------------------------------------------*/

    void Test()
    {
        //--- TEST ---//
    }

    public static void Main(string[] args) => new AC().Stream();

    private void Stream()
    {
        SetOut(IO_Z.StreamWriter);
        /*
        var exStdIn = new http://System.IO .StreamReader("stdin.txt");
        SetIn(exStdIn);
        Test();
        */
        Solve();
        Flush();
    }

}

static class IO_Z
{

    private static int Size = 1 << 12;
    private static readonly Stream Stream = OpenStandardInput();
    private static readonly byte[] Buffer = new byte[Size];
    private static int _ptr = 0, _buffLen = 0;

    [MethodImpl(MethodImplOptions.AggressiveInlining)]
    private static bool HasNextByte()
    {
        if (_ptr < _buffLen) return true;
        _ptr = 0;
        _buffLen = Stream.Read(Buffer, 0, Size);
        return _buffLen > 0;
    }

    [MethodImpl(MethodImplOptions.AggressiveInlining)]
    private static byte ReadByte()
    {
        if (HasNextByte()) return Buffer[_ptr++];
        else throw new EndOfStreamException("inputの末尾の改行がないとerror");
    }

    [MethodImpl(MethodImplOptions.AggressiveInlining)]
    private static bool IsAscii(int c) => '!' <= c && c <= '~';

    [MethodImpl(MethodImplOptions.AggressiveInlining)]
    private static char NextChar()
    {
        var b = ReadByte();
        while (!IsAscii(b)) b = ReadByte();
        return (char)b;
    }

    [MethodImpl(MethodImplOptions.AggressiveInlining)]
    private static string Next()
    {
        var sb = new StringBuilder();
        for (var b = NextChar(); IsAscii(b); b = (char)ReadByte()) sb.Append(b);
        return sb.ToString();
    }

    public static string Str => Next();
    public static char Cha => NextChar();
    public static int Int => int.Parse(Next());
    public static long Long => long.Parse(Next());
    public static double Double => double.Parse(Next());

    [MethodImpl(MethodImplOptions.AggressiveInlining)]
    private static void Scan <T>(ref T x)
    {
        if (x is int) __refvalue(__makeref(x), int) = int.Parse(Next());
        else if (x is long) __refvalue(__makeref(x), long) = long.Parse(Next());
        else if (x is double) __refvalue(__makeref(x), double) = double.Parse(Next());
        else if (x is char) __refvalue(__makeref(x), char) = NextChar();
        else __refvalue(__makeref(x), string) = Next();
    }

    [MethodImpl(MethodImplOptions.AggressiveInlining)]
    public static void I <T>(out T t)
    {
        t = default (T);
        Scan(ref t);
    }

    [MethodImpl(MethodImplOptions.AggressiveInlining)]
    public static void I <T, TU>(out T t, out TU u)
    {
        I(out t);
        I(out u);
    }

    [MethodImpl(MethodImplOptions.AggressiveInlining)]
    public static void I <T, TU, TV>(out T t, out TU u, out TV v)
    {
        I(out t, out u);
        I(out v);
    }

    [MethodImpl(MethodImplOptions.AggressiveInlining)]
    public static void I <T, TU, TV, TW>(out T t, out TU u, out TV v, out TW w)
    {
        I(out t, out u);
        I(out v, out w);
    }

    [MethodImpl(MethodImplOptions.AggressiveInlining)]
    public static void I <T, TU, TV, TW, TX>(out T t, out TU u, out TV v, out TW w, out TX x)
    {
        I(out t, out u, out v);
        I(out w, out x);
    }

    [MethodImpl(MethodImplOptions.AggressiveInlining)]
    public static void I <T, TU, TV, TW, TX, TY>(out T t, out TU u, out TV v, out TW w, out TX x, out TY y)
    {
        I(out t, out u, out v);
        I(out w, out x, out y);
    }

    public static void I <T>(out T[] a, int n)
    {
        a = new T[n];
        for (int i = 0; i < n; ++i) I(out a[i]);
    }

    public static void I <T, TU>(out T[] a, out TU[] b, int n)
    {
        a = new T[n];
        b = new TU[n];
        for (int i = 0; i < n; ++i) I(out a[i], out b[i]);
    }

    public static void I <T, TU, TV>(out T[] a, out TU[] b, out TV[] c, int n)
    {
        a = new T[n];
        b = new TU[n];
        c = new TV[n];
        for (var i = 0; i < n; ++i) I(out a[i], out b[i], out c[i]);
    }

    public static void I <T>(out T[,] a, int h, int w)
    {
        a = new T[h, w];
        for (int i = 0; i < h; ++i) for (int j = 0; j < w; ++j) I(out a[i, j]);
    }

    public static readonly StreamWriter StreamWriter = new StreamWriter(OpenStandardOutput())
    {
#if DEBUG
        AutoFlush = true
#else
        AutoFlush = false
#endif
    };

    public static void Flush() => Out.Flush();

    public static void Prt <T>(this T x) => WriteLine(x);

    public static void Prt <T>(this T[] xs) => xs.Iter(x => WriteLine(x));

}

static class Ex
{

    public static T[] Arr <T>(params T[] xs) => xs;

    public static void Iter <T>(this IEnumerable <T> xs, Action <T> f)
    {
        foreach (var x in xs) f(x);
    }

}

static class Util
{

    public static T IF <T>(bool b, Func <T> fTrue, Func <T> fFalse)
    {
        if (b) return fTrue();
        else return fFalse();
    }

    public static T LOCAL <T>(Func <T> f) => f();

    public static void FOR(int a, int b, int n, Action <int> f)
    {
        for (int i = a; i < b; i += n) f(i);
    }

    public static IEnumerable <Tuple <T1, T2>> ZIP <T1, T2>(IEnumerable <T1> xs, IEnumerable <T2> ys)
        => xs.Zip(ys, (x, y) => new Tuple <T1, T2>(x, y));

    public static void FOR(int a, int b, Action <int> f) => FOR(a, b, 1, f);

    public static void REP(int a, Action <int> f) => FOR(0, a, f);

    public static void REP(int a, int b, Action <int, int> f) => REP(a, i => REP(b, j => f(i, j)));

    public static void REP(int a, int b, int c, Action <int, int, int> f) => REP(a, i => REP(b, j => REP(c, k => f(i, j, k))));

    public static T MIN <T>(params T[] xs) => xs.Min();

    public static T MAX <T>(params T[] xs) => xs.Max();

    public static IEnumerable <int> RANGE(int s, int e) => Enumerable.Range(s, e - s + 1);

}