import itertools

import math

import fractions

import functools

import copy



N, T = list(map(int, input().split()))

c= []

t = []

for i in range(N):

     ci, ti = list(map(int, input().split()))

     c.append(ci)

     t.append(ti)



cost = 10**10

for i in range(N):

    if t[i] <= T:

        cost = min(cost,c[i])

if cost == 10**10:

    print("TLE")

else:print(cost)
def main():

    # n = int(input())

    n, t = list(map(int, input().split()))

    # a = list(map(int, input().split()))

    # s = input()

    ct = []

    for _ in range(n):

        ct.append(list(map(int, input().split())))



    mini = 10**10

    for i in range(n):

        if ct[i][1] <= t and ct[i][0] < mini:

            mini = ct[i][0]



    if mini == 10**10:

        print("TLE")

    else:

        print(mini)





if __name__ == '__main__':

    main()

import itertools
import math
import fractions
import functools
import copy

N, T = list(map(int, input().split()))
c = []
t = []
for i in range(N):
    ci, ti = list(map(int, input().split()))
    c.append(ci)
    t.append(ti)
cost = 10**10
for i in range(N):
    if t[i] <= T:
        cost = min(cost, c[i])
if cost == 10**10:
    print("TLE")
else:
    print(cost)

def main():
    # n = int(input())
    n, t = list(map(int, input().split()))
    # a = list(map(int, input().split()))
    # s = input()
    ct = []
    for _ in range(n):
        ct.append(list(map(int, input().split())))
    mini = 10**10
    for i in range(n):
        if ct[i][1] <= t and ct[i][0] < mini:
            mini = ct[i][0]
    if mini == 10**10:
        print("TLE")
    else:
        print(mini)


if __name__ == "__main__":
    main()

-import itertools -import math -import fractions -import functools -import copy +def main(): +    # n = int(input()) +    n, t = list(map(int, input().split())) +    # a = list(map(int, input().split())) +    # s = input() +    ct = [] +    for _ in range(n): +        ct.append(list(map(int, input().split()))) +    mini = 10**10 +    for i in range(n): +        if ct[i][1] <= t and ct[i][0] < mini: +            mini = ct[i][0] +    if mini == 10**10: +        print("TLE") +    else: +        print(mini) -N, T = list(map(int, input().split())) -c = [] -t = [] -for i in range(N): -    ci, ti = list(map(int, input().split())) -    c.append(ci) -    t.append(ti) -cost = 10**10 -for i in range(N): -    if t[i] <= T: -        cost = min(cost, c[i]) -if cost == 10**10: -    print("TLE") -else: -    print(cost) + +if __name__ == "__main__": +    main()