import java.util.*;
import java.awt.*;
import static java.lang.System.*;
import static java.lang.Math.*;
public class Main {
    public static void main(String[] args){
        Scanner sc = new Scanner(in);
        int n=sc.nextInt();
        int T=sc.nextInt();
        int[] t=new int[n];
        int[] c=new int[n];
        for (int i = 0; i < n; i++) {
            c[i]=sc.nextInt();
            t[i]=sc.nextInt();
        }
        int ans=114514;
        for (int i = 0; i < n; i++) {
            if(t[i]<=T)ans=min(ans,c[i]);
        }
        if(ans==114514){
            out.println("TLE");
        }else{
            out.println(ans);
        }
    }
} import java.util.*; util.* java import java.awt.*; awt.* java import static java.lang.System.*; import static java.lang.System.*; import static java.lang.System.*; import static java.lang.Math.*; import static java.lang.Math.*; import static java.lang.Math.*; public class Main {
    public static void main(String[] args){
        Scanner sc = new Scanner(in);
        int n=sc.nextInt();
        int T=sc.nextInt();
        int[] t=new int[n];
        int[] c=new int[n];
        for (int i = 0; i < n; i++) {
            c[i]=sc.nextInt();
            t[i]=sc.nextInt();
        }
        int ans=114514;
        for (int i = 0; i < n; i++) {
            if(t[i]<=T)ans=min(ans,c[i]);
        }
        if(ans==114514){
            out.println("TLE");
        }else{
            out.println(ans);
        }
    }
} Main public static void main(String[] args){
        Scanner sc = new Scanner(in);
        int n=sc.nextInt();
        int T=sc.nextInt();
        int[] t=new int[n];
        int[] c=new int[n];
        for (int i = 0; i < n; i++) {
            c[i]=sc.nextInt();
            t[i]=sc.nextInt();
        }
        int ans=114514;
        for (int i = 0; i < n; i++) {
            if(t[i]<=T)ans=min(ans,c[i]);
        }
        if(ans==114514){
            out.println("TLE");
        }else{
            out.println(ans);
        }
    } main {
        Scanner sc = new Scanner(in);
        int n=sc.nextInt();
        int T=sc.nextInt();
        int[] t=new int[n];
        int[] c=new int[n];
        for (int i = 0; i < n; i++) {
            c[i]=sc.nextInt();
            t[i]=sc.nextInt();
        }
        int ans=114514;
        for (int i = 0; i < n; i++) {
            if(t[i]<=T)ans=min(ans,c[i]);
        }
        if(ans==114514){
            out.println("TLE");
        }else{
            out.println(ans);
        }
    } Scanner sc = new Scanner(in); sc new Scanner(in) int n=sc.nextInt(); n sc.nextInt() sc.nextInt sc int T=sc.nextInt(); T sc.nextInt() sc.nextInt sc int[] t=new int[n]; t new int[n] n int[] c=new int[n]; c new int[n] n for (int i = 0; i < n; i++) {
            c[i]=sc.nextInt();
            t[i]=sc.nextInt();
        } int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
            c[i]=sc.nextInt();
            t[i]=sc.nextInt();
        } {
            c[i]=sc.nextInt();
            t[i]=sc.nextInt();
        } c[i]=sc.nextInt() c[i] c i sc.nextInt() sc.nextInt sc t[i]=sc.nextInt() t[i] t i sc.nextInt() sc.nextInt sc int ans=114514; ans 114514 for (int i = 0; i < n; i++) {
            if(t[i]<=T)ans=min(ans,c[i]);
        } int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
            if(t[i]<=T)ans=min(ans,c[i]);
        } {
            if(t[i]<=T)ans=min(ans,c[i]);
        } if(t[i]<=T)ans=min(ans,c[i]); t[i]<=T t[i] t i T ans=min(ans,c[i]) ans min(ans,c[i]) min ans c[i] c i if(ans==114514){
            out.println("TLE");
        }else{
            out.println(ans);
        } ans==114514 ans 114514 {
            out.println("TLE");
        } out.println("TLE") out.println out "TLE" {
            out.println(ans);
        } out.println(ans) out.println out ans String[] args args public class Main {
    public static void main(String[] args){
        Scanner sc = new Scanner(in);
        int n=sc.nextInt();
        int T=sc.nextInt();
        int[] t=new int[n];
        int[] c=new int[n];
        for (int i = 0; i < n; i++) {
            c[i]=sc.nextInt();
            t[i]=sc.nextInt();
        }
        int ans=114514;
        for (int i = 0; i < n; i++) {
            if(t[i]<=T)ans=min(ans,c[i]);
        }
        if(ans==114514){
            out.println("TLE");
        }else{
            out.println(ans);
        }
    }
} public class Main {
    public static void main(String[] args){
        Scanner sc = new Scanner(in);
        int n=sc.nextInt();
        int T=sc.nextInt();
        int[] t=new int[n];
        int[] c=new int[n];
        for (int i = 0; i < n; i++) {
            c[i]=sc.nextInt();
            t[i]=sc.nextInt();
        }
        int ans=114514;
        for (int i = 0; i < n; i++) {
            if(t[i]<=T)ans=min(ans,c[i]);
        }
        if(ans==114514){
            out.println("TLE");
        }else{
            out.println(ans);
        }
    }
} Main
import java.util.*;
import java.awt.*;
import static java.lang.System.*;
import static java.lang.Math.*;
public class Main {
    public static void main(String[] args){
        Scanner sc = new Scanner(in);
        int n=sc.nextInt();
        int T=sc.nextInt();
        int[] t=new int[n];
        int[] c=new int[n];
        for (int i = 0; i < n; i++) {
            c[i]=sc.nextInt();
            t[i]=sc.nextInt();
        }
        int ans=114514;
        for (int i = 0; i < n; i++) {
            if(t[i]<=T)ans=min(ans,c[i]);
        }
        if(ans==114514){
            out.println("TLE");
        }else{
            out.println(ans);
        }
    }
}