import java.io.*;
import java.util.*;


public class Main {

    public static void main(String[] args) throws IOException {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader in = new InputReader(inputStream);
        InputReader.OutputWriter out = new InputReader.OutputWriter(outputStream);

        int n = in.nextInt();
        int t = in.nextInt();
        int min = Integer.MAX_VALUE;
        while (n-->0) {
            int c = in.nextInt();
            int p = in.nextInt();
            if(p<=t) {
                min = Math.min(min,c);
            }
        }
        if(min == Integer.MAX_VALUE) {
            out.println("TLE");
        }
        else {
            out.println(min);
        }
        out.flush();
    }

    private boolean dfs(String [] maze,int i,int j,boolean[][] visited) {
        if(i<0 || i>=maze.length || j<0 || j>=maze[0].length() || visited[i][j] || maze[i].charAt(j) == '*') {
            return false;
        }
        if(maze[i].charAt(j) == 'T') return true;
        visited[i][j] = true;
        return dfs(maze,i+1,j,visited) || dfs(maze,i-1,j,visited) || dfs(maze,i,j+1,visited) || dfs(maze,i,j-1,visited);

    }

    private static boolean isPalindrome(char [] c, int i, int j) {
        if(i>=j) return true;
        if(c[i]!=c[j]) return false;
        return isPalindrome(c,++i,--j);
    }
    static int [] freq (char [] c) {
        int [] f = new int[26];
        for(char cc : c) {
            f[cc-'a']++;
        }
        return f;
    }
    static int check (int [] f, int k) {
        int count = 0;
        for (int i = 0; i < f.length; i++) {
            if(f[i] > 1) return 1;
            if(f[i] == 1) count++;
        }
        if(count == k) return 0;
        return -1;
    }
}

class InputReader extends BufferedReader {
    StringTokenizer tokenizer;

    public InputReader(InputStream inputStream) {
        super(new InputStreamReader(inputStream), 32768);
    }

    public InputReader(String filename) {
        super(new InputStreamReader(Thread.currentThread().getContextClassLoader().getResourceAsStream(filename)));
    }

    public String next() {
        while (tokenizer == null || !tokenizer.hasMoreTokens()) {
            try {
                tokenizer = new StringTokenizer(readLine());
            } catch (IOException e) {
                throw new RuntimeException();
            }
        }
        return tokenizer.nextToken();
    }
    public Integer nextInt() {return Integer.valueOf(next());}
    public Long nextLong() {return  Long.valueOf(next());}
    public Double nextDouble() {return Double.valueOf(next());}

    static class OutputWriter extends PrintWriter {
        public OutputWriter(OutputStream outputStream) {
            super(outputStream);
        }

        public OutputWriter(Writer writer) {
            super(writer);
        }

        public OutputWriter(String filename) throws FileNotFoundException {
            super(filename);
        }

        public void close() {
            super.close();
        }
    }
} import java.io.*; io.* java import java.util.*; util.* java public class Main {

    public static void main(String[] args) throws IOException {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader in = new InputReader(inputStream);
        InputReader.OutputWriter out = new InputReader.OutputWriter(outputStream);

        int n = in.nextInt();
        int t = in.nextInt();
        int min = Integer.MAX_VALUE;
        while (n-->0) {
            int c = in.nextInt();
            int p = in.nextInt();
            if(p<=t) {
                min = Math.min(min,c);
            }
        }
        if(min == Integer.MAX_VALUE) {
            out.println("TLE");
        }
        else {
            out.println(min);
        }
        out.flush();
    }

    private boolean dfs(String [] maze,int i,int j,boolean[][] visited) {
        if(i<0 || i>=maze.length || j<0 || j>=maze[0].length() || visited[i][j] || maze[i].charAt(j) == '*') {
            return false;
        }
        if(maze[i].charAt(j) == 'T') return true;
        visited[i][j] = true;
        return dfs(maze,i+1,j,visited) || dfs(maze,i-1,j,visited) || dfs(maze,i,j+1,visited) || dfs(maze,i,j-1,visited);

    }

    private static boolean isPalindrome(char [] c, int i, int j) {
        if(i>=j) return true;
        if(c[i]!=c[j]) return false;
        return isPalindrome(c,++i,--j);
    }
    static int [] freq (char [] c) {
        int [] f = new int[26];
        for(char cc : c) {
            f[cc-'a']++;
        }
        return f;
    }
    static int check (int [] f, int k) {
        int count = 0;
        for (int i = 0; i < f.length; i++) {
            if(f[i] > 1) return 1;
            if(f[i] == 1) count++;
        }
        if(count == k) return 0;
        return -1;
    }
} Main public static void main(String[] args) throws IOException {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader in = new InputReader(inputStream);
        InputReader.OutputWriter out = new InputReader.OutputWriter(outputStream);

        int n = in.nextInt();
        int t = in.nextInt();
        int min = Integer.MAX_VALUE;
        while (n-->0) {
            int c = in.nextInt();
            int p = in.nextInt();
            if(p<=t) {
                min = Math.min(min,c);
            }
        }
        if(min == Integer.MAX_VALUE) {
            out.println("TLE");
        }
        else {
            out.println(min);
        }
        out.flush();
    } main {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader in = new InputReader(inputStream);
        InputReader.OutputWriter out = new InputReader.OutputWriter(outputStream);

        int n = in.nextInt();
        int t = in.nextInt();
        int min = Integer.MAX_VALUE;
        while (n-->0) {
            int c = in.nextInt();
            int p = in.nextInt();
            if(p<=t) {
                min = Math.min(min,c);
            }
        }
        if(min == Integer.MAX_VALUE) {
            out.println("TLE");
        }
        else {
            out.println(min);
        }
        out.flush();
    } InputStream inputStream = System.in; inputStream System.in System System.in OutputStream outputStream = System.out; outputStream System.out System System.out InputReader in = new InputReader(inputStream); in new InputReader(inputStream) InputReader.OutputWriter out = new InputReader.OutputWriter(outputStream); out new InputReader.OutputWriter(outputStream) int n = in.nextInt(); n in.nextInt() in.nextInt in int t = in.nextInt(); t in.nextInt() in.nextInt in int min = Integer.MAX_VALUE; min Integer.MAX_VALUE Integer Integer.MAX_VALUE while (n-->0) {
            int c = in.nextInt();
            int p = in.nextInt();
            if(p<=t) {
                min = Math.min(min,c);
            }
        } n-->0 n-- n 0 {
            int c = in.nextInt();
            int p = in.nextInt();
            if(p<=t) {
                min = Math.min(min,c);
            }
        } int c = in.nextInt(); c in.nextInt() in.nextInt in int p = in.nextInt(); p in.nextInt() in.nextInt in if(p<=t) {
                min = Math.min(min,c);
            } p<=t p t {
                min = Math.min(min,c);
            } min = Math.min(min,c) min Math.min(min,c) Math.min Math min c if(min == Integer.MAX_VALUE) {
            out.println("TLE");
        }
        else {
            out.println(min);
        } min == Integer.MAX_VALUE min Integer.MAX_VALUE Integer Integer.MAX_VALUE {
            out.println("TLE");
        } out.println("TLE") out.println out "TLE" {
            out.println(min);
        } out.println(min) out.println out min out.flush() out.flush out String[] args args private boolean dfs(String [] maze,int i,int j,boolean[][] visited) {
        if(i<0 || i>=maze.length || j<0 || j>=maze[0].length() || visited[i][j] || maze[i].charAt(j) == '*') {
            return false;
        }
        if(maze[i].charAt(j) == 'T') return true;
        visited[i][j] = true;
        return dfs(maze,i+1,j,visited) || dfs(maze,i-1,j,visited) || dfs(maze,i,j+1,visited) || dfs(maze,i,j-1,visited);

    } dfs {
        if(i<0 || i>=maze.length || j<0 || j>=maze[0].length() || visited[i][j] || maze[i].charAt(j) == '*') {
            return false;
        }
        if(maze[i].charAt(j) == 'T') return true;
        visited[i][j] = true;
        return dfs(maze,i+1,j,visited) || dfs(maze,i-1,j,visited) || dfs(maze,i,j+1,visited) || dfs(maze,i,j-1,visited);

    } if(i<0 || i>=maze.length || j<0 || j>=maze[0].length() || visited[i][j] || maze[i].charAt(j) == '*') {
            return false;
        } i<0 || i>=maze.length || j<0 || j>=maze[0].length() || visited[i][j] || maze[i].charAt(j) == '*' visited[i][j] j>=maze[0].length() j<0 i<0 || i>=maze.length || j<0 || j>=maze[0].length() || visited[i][j] || maze[i].charAt(j) == '*' i<0 i 0 i>=maze.length i maze.length maze maze.length j<0 j 0 j>=maze[0].length() j maze[0].length() maze[0].length maze[0] maze 0 visited[i][j] visited[i] visited i j maze[i].charAt(j) == '*' maze[i].charAt(j) maze[i].charAt maze[i] maze i j '*' {
            return false;
        } return false; false if(maze[i].charAt(j) == 'T') return true; maze[i].charAt(j) == 'T' maze[i].charAt(j) maze[i].charAt maze[i] maze i j 'T' return true; true visited[i][j] = true visited[i][j] visited[i] visited i j true return dfs(maze,i+1,j,visited) || dfs(maze,i-1,j,visited) || dfs(maze,i,j+1,visited) || dfs(maze,i,j-1,visited); dfs(maze,i+1,j,visited) || dfs(maze,i-1,j,visited) || dfs(maze,i,j+1,visited) || dfs(maze,i,j-1,visited) dfs(maze,i,j+1,visited) dfs(maze,i+1,j,visited) || dfs(maze,i-1,j,visited) || dfs(maze,i,j+1,visited) || dfs(maze,i,j-1,visited) dfs(maze,i+1,j,visited) dfs maze i+1 i 1 j visited dfs(maze,i-1,j,visited) dfs maze i-1 i 1 j visited dfs(maze,i,j+1,visited) dfs maze i j+1 j 1 visited dfs(maze,i,j-1,visited) dfs maze i j-1 j 1 visited String [] maze maze int i i int j j boolean[][] visited visited private static boolean isPalindrome(char [] c, int i, int j) {
        if(i>=j) return true;
        if(c[i]!=c[j]) return false;
        return isPalindrome(c,++i,--j);
    } isPalindrome {
        if(i>=j) return true;
        if(c[i]!=c[j]) return false;
        return isPalindrome(c,++i,--j);
    } if(i>=j) return true; i>=j i j return true; true if(c[i]!=c[j]) return false; c[i]!=c[j] c[i] c i c[j] c j return false; false return isPalindrome(c,++i,--j); isPalindrome(c,++i,--j) isPalindrome c ++i i --j j char [] c c int i i int j j static int [] freq (char [] c) {
        int [] f = new int[26];
        for(char cc : c) {
            f[cc-'a']++;
        }
        return f;
    } freq {
        int [] f = new int[26];
        for(char cc : c) {
            f[cc-'a']++;
        }
        return f;
    } int [] f = new int[26]; f new int[26] 26 for(char cc : c) {
            f[cc-'a']++;
        } char cc c {
            f[cc-'a']++;
        } {
            f[cc-'a']++;
        } f[cc-'a']++ f[cc-'a'] f cc-'a' cc 'a' return f; f char [] c c static int check (int [] f, int k) {
        int count = 0;
        for (int i = 0; i < f.length; i++) {
            if(f[i] > 1) return 1;
            if(f[i] == 1) count++;
        }
        if(count == k) return 0;
        return -1;
    } check {
        int count = 0;
        for (int i = 0; i < f.length; i++) {
            if(f[i] > 1) return 1;
            if(f[i] == 1) count++;
        }
        if(count == k) return 0;
        return -1;
    } int count = 0; count 0 for (int i = 0; i < f.length; i++) {
            if(f[i] > 1) return 1;
            if(f[i] == 1) count++;
        } int i = 0; int i = 0; i 0 i < f.length i f.length f f.length i++ i++ i {
            if(f[i] > 1) return 1;
            if(f[i] == 1) count++;
        } {
            if(f[i] > 1) return 1;
            if(f[i] == 1) count++;
        } if(f[i] > 1) return 1; f[i] > 1 f[i] f i 1 return 1; 1 if(f[i] == 1) count++; f[i] == 1 f[i] f i 1 count++ count if(count == k) return 0; count == k count k return 0; 0 return -1; -1 1 int [] f f int k k class InputReader extends BufferedReader {
    StringTokenizer tokenizer;

    public InputReader(InputStream inputStream) {
        super(new InputStreamReader(inputStream), 32768);
    }

    public InputReader(String filename) {
        super(new InputStreamReader(Thread.currentThread().getContextClassLoader().getResourceAsStream(filename)));
    }

    public String next() {
        while (tokenizer == null || !tokenizer.hasMoreTokens()) {
            try {
                tokenizer = new StringTokenizer(readLine());
            } catch (IOException e) {
                throw new RuntimeException();
            }
        }
        return tokenizer.nextToken();
    }
    public Integer nextInt() {return Integer.valueOf(next());}
    public Long nextLong() {return  Long.valueOf(next());}
    public Double nextDouble() {return Double.valueOf(next());}

    static class OutputWriter extends PrintWriter {
        public OutputWriter(OutputStream outputStream) {
            super(outputStream);
        }

        public OutputWriter(Writer writer) {
            super(writer);
        }

        public OutputWriter(String filename) throws FileNotFoundException {
            super(filename);
        }

        public void close() {
            super.close();
        }
    }
} InputReader StringTokenizer tokenizer; tokenizer public InputReader(InputStream inputStream) {
        super(new InputStreamReader(inputStream), 32768);
    } InputReader {
        super(new InputStreamReader(inputStream), 32768);
    } super(new InputStreamReader(inputStream), 32768) super new InputStreamReader(inputStream) 32768 InputStream inputStream inputStream public InputReader(String filename) {
        super(new InputStreamReader(Thread.currentThread().getContextClassLoader().getResourceAsStream(filename)));
    } InputReader {
        super(new InputStreamReader(Thread.currentThread().getContextClassLoader().getResourceAsStream(filename)));
    } super(new InputStreamReader(Thread.currentThread().getContextClassLoader().getResourceAsStream(filename))) super new InputStreamReader(Thread.currentThread().getContextClassLoader().getResourceAsStream(filename)) String filename filename public String next() {
        while (tokenizer == null || !tokenizer.hasMoreTokens()) {
            try {
                tokenizer = new StringTokenizer(readLine());
            } catch (IOException e) {
                throw new RuntimeException();
            }
        }
        return tokenizer.nextToken();
    } next {
        while (tokenizer == null || !tokenizer.hasMoreTokens()) {
            try {
                tokenizer = new StringTokenizer(readLine());
            } catch (IOException e) {
                throw new RuntimeException();
            }
        }
        return tokenizer.nextToken();
    } while (tokenizer == null || !tokenizer.hasMoreTokens()) {
            try {
                tokenizer = new StringTokenizer(readLine());
            } catch (IOException e) {
                throw new RuntimeException();
            }
        } tokenizer == null || !tokenizer.hasMoreTokens() tokenizer == null tokenizer null !tokenizer.hasMoreTokens() tokenizer.hasMoreTokens() tokenizer.hasMoreTokens tokenizer {
            try {
                tokenizer = new StringTokenizer(readLine());
            } catch (IOException e) {
                throw new RuntimeException();
            }
        } try {
                tokenizer = new StringTokenizer(readLine());
            } catch (IOException e) {
                throw new RuntimeException();
            } catch (IOException e) {
                throw new RuntimeException();
            } IOException e {
                throw new RuntimeException();
            } throw new RuntimeException(); new RuntimeException() {
                tokenizer = new StringTokenizer(readLine());
            } tokenizer = new StringTokenizer(readLine()) tokenizer new StringTokenizer(readLine()) return tokenizer.nextToken(); tokenizer.nextToken() tokenizer.nextToken tokenizer public Integer nextInt() {return Integer.valueOf(next());} nextInt {return Integer.valueOf(next());} return Integer.valueOf(next()); Integer.valueOf(next()) Integer.valueOf Integer next() next public Long nextLong() {return  Long.valueOf(next());} nextLong {return  Long.valueOf(next());} return  Long.valueOf(next()); Long.valueOf(next()) Long.valueOf Long next() next public Double nextDouble() {return Double.valueOf(next());} nextDouble {return Double.valueOf(next());} return Double.valueOf(next()); Double.valueOf(next()) Double.valueOf Double next() next static class OutputWriter extends PrintWriter {
        public OutputWriter(OutputStream outputStream) {
            super(outputStream);
        }

        public OutputWriter(Writer writer) {
            super(writer);
        }

        public OutputWriter(String filename) throws FileNotFoundException {
            super(filename);
        }

        public void close() {
            super.close();
        }
    } OutputWriter public OutputWriter(OutputStream outputStream) {
            super(outputStream);
        } OutputWriter {
            super(outputStream);
        } super(outputStream) super outputStream OutputStream outputStream outputStream public OutputWriter(Writer writer) {
            super(writer);
        } OutputWriter {
            super(writer);
        } super(writer) super writer Writer writer writer public OutputWriter(String filename) throws FileNotFoundException {
            super(filename);
        } OutputWriter {
            super(filename);
        } super(filename) super filename String filename filename public void close() {
            super.close();
        } close {
            super.close();
        } super.close() super.close super PrintWriter BufferedReader public class Main {

    public static void main(String[] args) throws IOException {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader in = new InputReader(inputStream);
        InputReader.OutputWriter out = new InputReader.OutputWriter(outputStream);

        int n = in.nextInt();
        int t = in.nextInt();
        int min = Integer.MAX_VALUE;
        while (n-->0) {
            int c = in.nextInt();
            int p = in.nextInt();
            if(p<=t) {
                min = Math.min(min,c);
            }
        }
        if(min == Integer.MAX_VALUE) {
            out.println("TLE");
        }
        else {
            out.println(min);
        }
        out.flush();
    }

    private boolean dfs(String [] maze,int i,int j,boolean[][] visited) {
        if(i<0 || i>=maze.length || j<0 || j>=maze[0].length() || visited[i][j] || maze[i].charAt(j) == '*') {
            return false;
        }
        if(maze[i].charAt(j) == 'T') return true;
        visited[i][j] = true;
        return dfs(maze,i+1,j,visited) || dfs(maze,i-1,j,visited) || dfs(maze,i,j+1,visited) || dfs(maze,i,j-1,visited);

    }

    private static boolean isPalindrome(char [] c, int i, int j) {
        if(i>=j) return true;
        if(c[i]!=c[j]) return false;
        return isPalindrome(c,++i,--j);
    }
    static int [] freq (char [] c) {
        int [] f = new int[26];
        for(char cc : c) {
            f[cc-'a']++;
        }
        return f;
    }
    static int check (int [] f, int k) {
        int count = 0;
        for (int i = 0; i < f.length; i++) {
            if(f[i] > 1) return 1;
            if(f[i] == 1) count++;
        }
        if(count == k) return 0;
        return -1;
    }
} public class Main {

    public static void main(String[] args) throws IOException {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader in = new InputReader(inputStream);
        InputReader.OutputWriter out = new InputReader.OutputWriter(outputStream);

        int n = in.nextInt();
        int t = in.nextInt();
        int min = Integer.MAX_VALUE;
        while (n-->0) {
            int c = in.nextInt();
            int p = in.nextInt();
            if(p<=t) {
                min = Math.min(min,c);
            }
        }
        if(min == Integer.MAX_VALUE) {
            out.println("TLE");
        }
        else {
            out.println(min);
        }
        out.flush();
    }

    private boolean dfs(String [] maze,int i,int j,boolean[][] visited) {
        if(i<0 || i>=maze.length || j<0 || j>=maze[0].length() || visited[i][j] || maze[i].charAt(j) == '*') {
            return false;
        }
        if(maze[i].charAt(j) == 'T') return true;
        visited[i][j] = true;
        return dfs(maze,i+1,j,visited) || dfs(maze,i-1,j,visited) || dfs(maze,i,j+1,visited) || dfs(maze,i,j-1,visited);

    }

    private static boolean isPalindrome(char [] c, int i, int j) {
        if(i>=j) return true;
        if(c[i]!=c[j]) return false;
        return isPalindrome(c,++i,--j);
    }
    static int [] freq (char [] c) {
        int [] f = new int[26];
        for(char cc : c) {
            f[cc-'a']++;
        }
        return f;
    }
    static int check (int [] f, int k) {
        int count = 0;
        for (int i = 0; i < f.length; i++) {
            if(f[i] > 1) return 1;
            if(f[i] == 1) count++;
        }
        if(count == k) return 0;
        return -1;
    }
} Main
import java.io.*;
import java.util.*;


public class Main {

    public static void main(String[] args) throws IOException {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader in = new InputReader(inputStream);
        InputReader.OutputWriter out = new InputReader.OutputWriter(outputStream);

        int n = in.nextInt();
        int t = in.nextInt();
        int min = Integer.MAX_VALUE;
        while (n-->0) {
            int c = in.nextInt();
            int p = in.nextInt();
            if(p<=t) {
                min = Math.min(min,c);
            }
        }
        if(min == Integer.MAX_VALUE) {
            out.println("TLE");
        }
        else {
            out.println(min);
        }
        out.flush();
    }

    private boolean dfs(String [] maze,int i,int j,boolean[][] visited) {
        if(i<0 || i>=maze.length || j<0 || j>=maze[0].length() || visited[i][j] || maze[i].charAt(j) == '*') {
            return false;
        }
        if(maze[i].charAt(j) == 'T') return true;
        visited[i][j] = true;
        return dfs(maze,i+1,j,visited) || dfs(maze,i-1,j,visited) || dfs(maze,i,j+1,visited) || dfs(maze,i,j-1,visited);

    }

    private static boolean isPalindrome(char [] c, int i, int j) {
        if(i>=j) return true;
        if(c[i]!=c[j]) return false;
        return isPalindrome(c,++i,--j);
    }
    static int [] freq (char [] c) {
        int [] f = new int[26];
        for(char cc : c) {
            f[cc-'a']++;
        }
        return f;
    }
    static int check (int [] f, int k) {
        int count = 0;
        for (int i = 0; i < f.length; i++) {
            if(f[i] > 1) return 1;
            if(f[i] == 1) count++;
        }
        if(count == k) return 0;
        return -1;
    }
}

class InputReader extends BufferedReader {
    StringTokenizer tokenizer;

    public InputReader(InputStream inputStream) {
        super(new InputStreamReader(inputStream), 32768);
    }

    public InputReader(String filename) {
        super(new InputStreamReader(Thread.currentThread().getContextClassLoader().getResourceAsStream(filename)));
    }

    public String next() {
        while (tokenizer == null || !tokenizer.hasMoreTokens()) {
            try {
                tokenizer = new StringTokenizer(readLine());
            } catch (IOException e) {
                throw new RuntimeException();
            }
        }
        return tokenizer.nextToken();
    }
    public Integer nextInt() {return Integer.valueOf(next());}
    public Long nextLong() {return  Long.valueOf(next());}
    public Double nextDouble() {return Double.valueOf(next());}

    static class OutputWriter extends PrintWriter {
        public OutputWriter(OutputStream outputStream) {
            super(outputStream);
        }

        public OutputWriter(Writer writer) {
            super(writer);
        }

        public OutputWriter(String filename) throws FileNotFoundException {
            super(filename);
        }

        public void close() {
            super.close();
        }
    }
}