import java.util.*;
public class Main {
    public static void main(String args[]) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt(), T = sc.nextInt();
        int[] c = new int[n];
        int[] t = new int[n];
        for (int i = 0; i < n; i++) {
            c[i] = sc.nextInt();
            t[i] = sc.nextInt();
        }
        int ans = INF;
        boolean exist = false;
        for (int i = 0; i < n; i++) {
            if (t[i] <= T) { 
                exist = true;
                ans = Math.min(ans, c[i]);
            }
        }
        if (exist) System.out.println(ans);
        else System.out.println("TLE");
    }
    public static final int INF = 10000;
} import java.util.*; util.* java public class Main {
    public static void main(String args[]) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt(), T = sc.nextInt();
        int[] c = new int[n];
        int[] t = new int[n];
        for (int i = 0; i < n; i++) {
            c[i] = sc.nextInt();
            t[i] = sc.nextInt();
        }
        int ans = INF;
        boolean exist = false;
        for (int i = 0; i < n; i++) {
            if (t[i] <= T) { 
                exist = true;
                ans = Math.min(ans, c[i]);
            }
        }
        if (exist) System.out.println(ans);
        else System.out.println("TLE");
    }
    public static final int INF = 10000;
} Main public static final int INF = 10000; INF 10000 public static void main(String args[]) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt(), T = sc.nextInt();
        int[] c = new int[n];
        int[] t = new int[n];
        for (int i = 0; i < n; i++) {
            c[i] = sc.nextInt();
            t[i] = sc.nextInt();
        }
        int ans = INF;
        boolean exist = false;
        for (int i = 0; i < n; i++) {
            if (t[i] <= T) { 
                exist = true;
                ans = Math.min(ans, c[i]);
            }
        }
        if (exist) System.out.println(ans);
        else System.out.println("TLE");
    } main {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt(), T = sc.nextInt();
        int[] c = new int[n];
        int[] t = new int[n];
        for (int i = 0; i < n; i++) {
            c[i] = sc.nextInt();
            t[i] = sc.nextInt();
        }
        int ans = INF;
        boolean exist = false;
        for (int i = 0; i < n; i++) {
            if (t[i] <= T) { 
                exist = true;
                ans = Math.min(ans, c[i]);
            }
        }
        if (exist) System.out.println(ans);
        else System.out.println("TLE");
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int n = sc.nextInt() n sc.nextInt() sc.nextInt sc T = sc.nextInt(); T sc.nextInt() sc.nextInt sc int[] c = new int[n]; c new int[n] n int[] t = new int[n]; t 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 = INF; ans INF boolean exist = false; exist false for (int i = 0; i < n; i++) {
            if (t[i] <= T) { 
                exist = true;
                ans = Math.min(ans, c[i]);
            }
        } int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
            if (t[i] <= T) { 
                exist = true;
                ans = Math.min(ans, c[i]);
            }
        } {
            if (t[i] <= T) { 
                exist = true;
                ans = Math.min(ans, c[i]);
            }
        } if (t[i] <= T) { 
                exist = true;
                ans = Math.min(ans, c[i]);
            } t[i] <= T t[i] t i T { 
                exist = true;
                ans = Math.min(ans, c[i]);
            } exist = true exist true ans = Math.min(ans, c[i]) ans Math.min(ans, c[i]) Math.min Math ans c[i] c i if (exist) System.out.println(ans);
        else System.out.println("TLE"); exist System.out.println(ans) System.out.println System.out System System.out ans System.out.println("TLE") System.out.println System.out System System.out "TLE" String args[] args public class Main {
    public static void main(String args[]) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt(), T = sc.nextInt();
        int[] c = new int[n];
        int[] t = new int[n];
        for (int i = 0; i < n; i++) {
            c[i] = sc.nextInt();
            t[i] = sc.nextInt();
        }
        int ans = INF;
        boolean exist = false;
        for (int i = 0; i < n; i++) {
            if (t[i] <= T) { 
                exist = true;
                ans = Math.min(ans, c[i]);
            }
        }
        if (exist) System.out.println(ans);
        else System.out.println("TLE");
    }
    public static final int INF = 10000;
} public class Main {
    public static void main(String args[]) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt(), T = sc.nextInt();
        int[] c = new int[n];
        int[] t = new int[n];
        for (int i = 0; i < n; i++) {
            c[i] = sc.nextInt();
            t[i] = sc.nextInt();
        }
        int ans = INF;
        boolean exist = false;
        for (int i = 0; i < n; i++) {
            if (t[i] <= T) { 
                exist = true;
                ans = Math.min(ans, c[i]);
            }
        }
        if (exist) System.out.println(ans);
        else System.out.println("TLE");
    }
    public static final int INF = 10000;
} Main
import java.util.*;
public class Main {
    public static void main(String args[]) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt(), T = sc.nextInt();
        int[] c = new int[n];
        int[] t = new int[n];
        for (int i = 0; i < n; i++) {
            c[i] = sc.nextInt();
            t[i] = sc.nextInt();
        }
        int ans = INF;
        boolean exist = false;
        for (int i = 0; i < n; i++) {
            if (t[i] <= T) { 
                exist = true;
                ans = Math.min(ans, c[i]);
            }
        }
        if (exist) System.out.println(ans);
        else System.out.println("TLE");
    }
    public static final int INF = 10000;
}