import java.util.*;

class Main {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        int N = in.nextInt();
        int T = in.nextInt();
        int[] c = new int[N];
        int[] t = new int[N];
        for(int i=0; i<N; i++) {
            c[i] = in.nextInt();
            t[i] = in.nextInt();
        }

        int ans = -1;
        int min = Integer.MAX_VALUE;
        for(int i=0; i<N; i++) {
            if(t[i] > T) {
                continue;
            } else {
                if(c[i] < min) {
                    ans = i;
                    min = c[i];
                }
            }
        }

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

        int ans = -1;
        int min = Integer.MAX_VALUE;
        for(int i=0; i<N; i++) {
            if(t[i] > T) {
                continue;
            } else {
                if(c[i] < min) {
                    ans = i;
                    min = c[i];
                }
            }
        }

        if(ans == -1) System.out.println("TLE");
        else System.out.println(min);
    }
} Main public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        int N = in.nextInt();
        int T = in.nextInt();
        int[] c = new int[N];
        int[] t = new int[N];
        for(int i=0; i<N; i++) {
            c[i] = in.nextInt();
            t[i] = in.nextInt();
        }

        int ans = -1;
        int min = Integer.MAX_VALUE;
        for(int i=0; i<N; i++) {
            if(t[i] > T) {
                continue;
            } else {
                if(c[i] < min) {
                    ans = i;
                    min = c[i];
                }
            }
        }

        if(ans == -1) System.out.println("TLE");
        else System.out.println(min);
    } main {
        Scanner in = new Scanner(System.in);
        int N = in.nextInt();
        int T = in.nextInt();
        int[] c = new int[N];
        int[] t = new int[N];
        for(int i=0; i<N; i++) {
            c[i] = in.nextInt();
            t[i] = in.nextInt();
        }

        int ans = -1;
        int min = Integer.MAX_VALUE;
        for(int i=0; i<N; i++) {
            if(t[i] > T) {
                continue;
            } else {
                if(c[i] < min) {
                    ans = i;
                    min = c[i];
                }
            }
        }

        if(ans == -1) System.out.println("TLE");
        else System.out.println(min);
    } Scanner in = new Scanner(System.in); in new Scanner(System.in) int N = in.nextInt(); N in.nextInt() in.nextInt in int T = in.nextInt(); T in.nextInt() in.nextInt in 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] = in.nextInt();
            t[i] = in.nextInt();
        } int i=0; int i=0; i 0 i<N i N i++ i++ i {
            c[i] = in.nextInt();
            t[i] = in.nextInt();
        } {
            c[i] = in.nextInt();
            t[i] = in.nextInt();
        } c[i] = in.nextInt() c[i] c i in.nextInt() in.nextInt in t[i] = in.nextInt() t[i] t i in.nextInt() in.nextInt in int ans = -1; ans -1 1 int min = Integer.MAX_VALUE; min Integer.MAX_VALUE Integer Integer.MAX_VALUE for(int i=0; i<N; i++) {
            if(t[i] > T) {
                continue;
            } else {
                if(c[i] < min) {
                    ans = i;
                    min = c[i];
                }
            }
        } int i=0; int i=0; i 0 i<N i N i++ i++ i {
            if(t[i] > T) {
                continue;
            } else {
                if(c[i] < min) {
                    ans = i;
                    min = c[i];
                }
            }
        } {
            if(t[i] > T) {
                continue;
            } else {
                if(c[i] < min) {
                    ans = i;
                    min = c[i];
                }
            }
        } if(t[i] > T) {
                continue;
            } else {
                if(c[i] < min) {
                    ans = i;
                    min = c[i];
                }
            } t[i] > T t[i] t i T {
                continue;
            } continue; {
                if(c[i] < min) {
                    ans = i;
                    min = c[i];
                }
            } if(c[i] < min) {
                    ans = i;
                    min = c[i];
                } c[i] < min c[i] c i min {
                    ans = i;
                    min = c[i];
                } ans = i ans i min = c[i] min c[i] c i if(ans == -1) System.out.println("TLE");
        else System.out.println(min); ans == -1 ans -1 1 System.out.println("TLE") System.out.println System.out System System.out "TLE" System.out.println(min) System.out.println System.out System System.out min String[] args args
import java.util.*;

class Main {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        int N = in.nextInt();
        int T = in.nextInt();
        int[] c = new int[N];
        int[] t = new int[N];
        for(int i=0; i<N; i++) {
            c[i] = in.nextInt();
            t[i] = in.nextInt();
        }

        int ans = -1;
        int min = Integer.MAX_VALUE;
        for(int i=0; i<N; i++) {
            if(t[i] > T) {
                continue;
            } else {
                if(c[i] < min) {
                    ans = i;
                    min = c[i];
                }
            }
        }

        if(ans == -1) System.out.println("TLE");
        else System.out.println(min);
    }
}