import java.util.*;
import java.io.*;
 class Main{
public static void main(String[] args)throws IOException {
    FastReader in=new FastReader(System.in);
    int n=in.nextInt();
    int t=in.nextInt();
    int arr[][]=new int[n][2];
    int f=-1,i,max=1001;
    for(i=0;i<n;i++)
    {
        arr[i][0]=in.nextInt();
        arr[i][1]=in.nextInt();
        if(arr[i][1]<=t)
        {
            if(arr[i][0]<max)
            max=arr[i][0];
            f=1;
        }
    }
    if(f==-1)
    System.out.println("TLE");
    else
    System.out.println(max);
}
}
class FastReader {
 
    byte[] buf = new byte[2048];
    int index, total;
    InputStream in;
 
    FastReader(InputStream is) {
        in = is;
    }
 
    int scan() throws IOException {
        if (index >= total) {
            index = 0;
            total = in.read(buf);
            if (total <= 0) {
                return -1;
            }
        }
        return buf[index++];
    }
 
    String next() throws IOException {
        int c;
        for (c = scan(); c <= 32; c = scan());
        StringBuilder sb = new StringBuilder();
        for (; c > 32; c = scan()) {
            sb.append((char) c);
        }
        return sb.toString();
    }
    String nextLine() throws IOException {
        int c;
        for (c = scan(); c <= 32; c = scan());
        StringBuilder sb = new StringBuilder();
        for (; c !=10; c = scan()) {
            sb.append((char) c);
        }
        return sb.toString();
    }
    char nextChar() throws IOException{
        int c;
         for (c = scan(); c <= 32; c = scan());
         return (char)c;
        }
 
    int nextInt() throws IOException {
        int c, val = 0;
        for (c = scan(); c <= 32; c = scan());
        boolean neg = c == '-';
        if (c == '-' || c == '+') {
            c = scan();
        }
        for (; c >= '0' && c <= '9'; c = scan()) {
            val = (val << 3) + (val << 1) + (c & 15);
        }
        return neg ? -val : val;
    }
 
    long nextLong() throws IOException {
        int c;
        long val = 0;
        for (c = scan(); c <= 32; c = scan());
        boolean neg = c == '-';
        if (c == '-' || c == '+') {
            c = scan();
        }
        for (; c >= '0' && c <= '9'; c = scan()) {
            val = (val << 3) + (val << 1) + (c & 15);
        }
        return neg ? -val : val;
    }
} import java.util.*; util.* java import java.io.*; io.* java class Main{
public static void main(String[] args)throws IOException {
    FastReader in=new FastReader(System.in);
    int n=in.nextInt();
    int t=in.nextInt();
    int arr[][]=new int[n][2];
    int f=-1,i,max=1001;
    for(i=0;i<n;i++)
    {
        arr[i][0]=in.nextInt();
        arr[i][1]=in.nextInt();
        if(arr[i][1]<=t)
        {
            if(arr[i][0]<max)
            max=arr[i][0];
            f=1;
        }
    }
    if(f==-1)
    System.out.println("TLE");
    else
    System.out.println(max);
}
} Main public static void main(String[] args)throws IOException {
    FastReader in=new FastReader(System.in);
    int n=in.nextInt();
    int t=in.nextInt();
    int arr[][]=new int[n][2];
    int f=-1,i,max=1001;
    for(i=0;i<n;i++)
    {
        arr[i][0]=in.nextInt();
        arr[i][1]=in.nextInt();
        if(arr[i][1]<=t)
        {
            if(arr[i][0]<max)
            max=arr[i][0];
            f=1;
        }
    }
    if(f==-1)
    System.out.println("TLE");
    else
    System.out.println(max);
} main {
    FastReader in=new FastReader(System.in);
    int n=in.nextInt();
    int t=in.nextInt();
    int arr[][]=new int[n][2];
    int f=-1,i,max=1001;
    for(i=0;i<n;i++)
    {
        arr[i][0]=in.nextInt();
        arr[i][1]=in.nextInt();
        if(arr[i][1]<=t)
        {
            if(arr[i][0]<max)
            max=arr[i][0];
            f=1;
        }
    }
    if(f==-1)
    System.out.println("TLE");
    else
    System.out.println(max);
} FastReader in=new FastReader(System.in); in new FastReader(System.in) int n=in.nextInt(); n in.nextInt() in.nextInt in int t=in.nextInt(); t in.nextInt() in.nextInt in int arr[][]=new int[n][2]; arr new int[n][2] n 2 int f=-1 f -1 1 i i max=1001; max 1001 for(i=0;i<n;i++)
    {
        arr[i][0]=in.nextInt();
        arr[i][1]=in.nextInt();
        if(arr[i][1]<=t)
        {
            if(arr[i][0]<max)
            max=arr[i][0];
            f=1;
        }
    } i=0; i=0 i 0 i<n i n i++ i++ i {
        arr[i][0]=in.nextInt();
        arr[i][1]=in.nextInt();
        if(arr[i][1]<=t)
        {
            if(arr[i][0]<max)
            max=arr[i][0];
            f=1;
        }
    } {
        arr[i][0]=in.nextInt();
        arr[i][1]=in.nextInt();
        if(arr[i][1]<=t)
        {
            if(arr[i][0]<max)
            max=arr[i][0];
            f=1;
        }
    } arr[i][0]=in.nextInt() arr[i][0] arr[i] arr i 0 in.nextInt() in.nextInt in arr[i][1]=in.nextInt() arr[i][1] arr[i] arr i 1 in.nextInt() in.nextInt in if(arr[i][1]<=t)
        {
            if(arr[i][0]<max)
            max=arr[i][0];
            f=1;
        } arr[i][1]<=t arr[i][1] arr[i] arr i 1 t {
            if(arr[i][0]<max)
            max=arr[i][0];
            f=1;
        } if(arr[i][0]<max)
            max=arr[i][0]; arr[i][0]<max arr[i][0] arr[i] arr i 0 max max=arr[i][0] max arr[i][0] arr[i] arr i 0 f=1 f 1 if(f==-1)
    System.out.println("TLE");
    else
    System.out.println(max); f==-1 f -1 1 System.out.println("TLE") System.out.println System.out System System.out "TLE" System.out.println(max) System.out.println System.out System System.out max String[] args args class FastReader {
 
    byte[] buf = new byte[2048];
    int index, total;
    InputStream in;
 
    FastReader(InputStream is) {
        in = is;
    }
 
    int scan() throws IOException {
        if (index >= total) {
            index = 0;
            total = in.read(buf);
            if (total <= 0) {
                return -1;
            }
        }
        return buf[index++];
    }
 
    String next() throws IOException {
        int c;
        for (c = scan(); c <= 32; c = scan());
        StringBuilder sb = new StringBuilder();
        for (; c > 32; c = scan()) {
            sb.append((char) c);
        }
        return sb.toString();
    }
    String nextLine() throws IOException {
        int c;
        for (c = scan(); c <= 32; c = scan());
        StringBuilder sb = new StringBuilder();
        for (; c !=10; c = scan()) {
            sb.append((char) c);
        }
        return sb.toString();
    }
    char nextChar() throws IOException{
        int c;
         for (c = scan(); c <= 32; c = scan());
         return (char)c;
        }
 
    int nextInt() throws IOException {
        int c, val = 0;
        for (c = scan(); c <= 32; c = scan());
        boolean neg = c == '-';
        if (c == '-' || c == '+') {
            c = scan();
        }
        for (; c >= '0' && c <= '9'; c = scan()) {
            val = (val << 3) + (val << 1) + (c & 15);
        }
        return neg ? -val : val;
    }
 
    long nextLong() throws IOException {
        int c;
        long val = 0;
        for (c = scan(); c <= 32; c = scan());
        boolean neg = c == '-';
        if (c == '-' || c == '+') {
            c = scan();
        }
        for (; c >= '0' && c <= '9'; c = scan()) {
            val = (val << 3) + (val << 1) + (c & 15);
        }
        return neg ? -val : val;
    }
} FastReader byte[] buf = new byte[2048]; buf new byte[2048] 2048 int index index total; total InputStream in; in FastReader(InputStream is) {
        in = is;
    } FastReader {
        in = is;
    } in = is in is InputStream is is int scan() throws IOException {
        if (index >= total) {
            index = 0;
            total = in.read(buf);
            if (total <= 0) {
                return -1;
            }
        }
        return buf[index++];
    } scan {
        if (index >= total) {
            index = 0;
            total = in.read(buf);
            if (total <= 0) {
                return -1;
            }
        }
        return buf[index++];
    } if (index >= total) {
            index = 0;
            total = in.read(buf);
            if (total <= 0) {
                return -1;
            }
        } index >= total index total {
            index = 0;
            total = in.read(buf);
            if (total <= 0) {
                return -1;
            }
        } index = 0 index 0 total = in.read(buf) total in.read(buf) in.read in buf if (total <= 0) {
                return -1;
            } total <= 0 total 0 {
                return -1;
            } return -1; -1 1 return buf[index++]; buf[index++] buf index++ index String next() throws IOException {
        int c;
        for (c = scan(); c <= 32; c = scan());
        StringBuilder sb = new StringBuilder();
        for (; c > 32; c = scan()) {
            sb.append((char) c);
        }
        return sb.toString();
    } next {
        int c;
        for (c = scan(); c <= 32; c = scan());
        StringBuilder sb = new StringBuilder();
        for (; c > 32; c = scan()) {
            sb.append((char) c);
        }
        return sb.toString();
    } int c; c for (c = scan(); c <= 32; c = scan()); c = scan(); c = scan() c scan() scan c <= 32 c 32 c = scan() c = scan() c scan() scan ; StringBuilder sb = new StringBuilder(); sb new StringBuilder() for (; c > 32; c = scan()) {
            sb.append((char) c);
        } ; c > 32 c 32 c = scan() c = scan() c scan() scan {
            sb.append((char) c);
        } {
            sb.append((char) c);
        } sb.append((char) c) sb.append sb (char) c return sb.toString(); sb.toString() sb.toString sb String nextLine() throws IOException {
        int c;
        for (c = scan(); c <= 32; c = scan());
        StringBuilder sb = new StringBuilder();
        for (; c !=10; c = scan()) {
            sb.append((char) c);
        }
        return sb.toString();
    } nextLine {
        int c;
        for (c = scan(); c <= 32; c = scan());
        StringBuilder sb = new StringBuilder();
        for (; c !=10; c = scan()) {
            sb.append((char) c);
        }
        return sb.toString();
    } int c; c for (c = scan(); c <= 32; c = scan()); c = scan(); c = scan() c scan() scan c <= 32 c 32 c = scan() c = scan() c scan() scan ; StringBuilder sb = new StringBuilder(); sb new StringBuilder() for (; c !=10; c = scan()) {
            sb.append((char) c);
        } ; c !=10 c 10 c = scan() c = scan() c scan() scan {
            sb.append((char) c);
        } {
            sb.append((char) c);
        } sb.append((char) c) sb.append sb (char) c return sb.toString(); sb.toString() sb.toString sb char nextChar() throws IOException{
        int c;
         for (c = scan(); c <= 32; c = scan());
         return (char)c;
        } nextChar {
        int c;
         for (c = scan(); c <= 32; c = scan());
         return (char)c;
        } int c; c for (c = scan(); c <= 32; c = scan()); c = scan(); c = scan() c scan() scan c <= 32 c 32 c = scan() c = scan() c scan() scan ; return (char)c; (char)c int nextInt() throws IOException {
        int c, val = 0;
        for (c = scan(); c <= 32; c = scan());
        boolean neg = c == '-';
        if (c == '-' || c == '+') {
            c = scan();
        }
        for (; c >= '0' && c <= '9'; c = scan()) {
            val = (val << 3) + (val << 1) + (c & 15);
        }
        return neg ? -val : val;
    } nextInt {
        int c, val = 0;
        for (c = scan(); c <= 32; c = scan());
        boolean neg = c == '-';
        if (c == '-' || c == '+') {
            c = scan();
        }
        for (; c >= '0' && c <= '9'; c = scan()) {
            val = (val << 3) + (val << 1) + (c & 15);
        }
        return neg ? -val : val;
    } int c c val = 0; val 0 for (c = scan(); c <= 32; c = scan()); c = scan(); c = scan() c scan() scan c <= 32 c 32 c = scan() c = scan() c scan() scan ; boolean neg = c == '-'; neg c == '-' c '-' if (c == '-' || c == '+') {
            c = scan();
        } c == '-' || c == '+' c == '-' c '-' c == '+' c '+' {
            c = scan();
        } c = scan() c scan() scan for (; c >= '0' && c <= '9'; c = scan()) {
            val = (val << 3) + (val << 1) + (c & 15);
        } ; c >= '0' && c <= '9' c >= '0' c '0' c <= '9' c '9' c = scan() c = scan() c scan() scan {
            val = (val << 3) + (val << 1) + (c & 15);
        } {
            val = (val << 3) + (val << 1) + (c & 15);
        } val = (val << 3) + (val << 1) + (c & 15) val (val << 3) + (val << 1) + (c & 15) (val << 3) + (val << 1) + (c & 15) (val << 3) val 3 (val << 1) val 1 (c & 15) c 15 return neg ? -val : val; neg ? -val : val neg -val val val long nextLong() throws IOException {
        int c;
        long val = 0;
        for (c = scan(); c <= 32; c = scan());
        boolean neg = c == '-';
        if (c == '-' || c == '+') {
            c = scan();
        }
        for (; c >= '0' && c <= '9'; c = scan()) {
            val = (val << 3) + (val << 1) + (c & 15);
        }
        return neg ? -val : val;
    } nextLong {
        int c;
        long val = 0;
        for (c = scan(); c <= 32; c = scan());
        boolean neg = c == '-';
        if (c == '-' || c == '+') {
            c = scan();
        }
        for (; c >= '0' && c <= '9'; c = scan()) {
            val = (val << 3) + (val << 1) + (c & 15);
        }
        return neg ? -val : val;
    } int c; c long val = 0; val 0 for (c = scan(); c <= 32; c = scan()); c = scan(); c = scan() c scan() scan c <= 32 c 32 c = scan() c = scan() c scan() scan ; boolean neg = c == '-'; neg c == '-' c '-' if (c == '-' || c == '+') {
            c = scan();
        } c == '-' || c == '+' c == '-' c '-' c == '+' c '+' {
            c = scan();
        } c = scan() c scan() scan for (; c >= '0' && c <= '9'; c = scan()) {
            val = (val << 3) + (val << 1) + (c & 15);
        } ; c >= '0' && c <= '9' c >= '0' c '0' c <= '9' c '9' c = scan() c = scan() c scan() scan {
            val = (val << 3) + (val << 1) + (c & 15);
        } {
            val = (val << 3) + (val << 1) + (c & 15);
        } val = (val << 3) + (val << 1) + (c & 15) val (val << 3) + (val << 1) + (c & 15) (val << 3) + (val << 1) + (c & 15) (val << 3) val 3 (val << 1) val 1 (c & 15) c 15 return neg ? -val : val; neg ? -val : val neg -val val val
import java.util.*;
import java.io.*;
 class Main{
public static void main(String[] args)throws IOException {
    FastReader in=new FastReader(System.in);
    int n=in.nextInt();
    int t=in.nextInt();
    int arr[][]=new int[n][2];
    int f=-1,i,max=1001;
    for(i=0;i<n;i++)
    {
        arr[i][0]=in.nextInt();
        arr[i][1]=in.nextInt();
        if(arr[i][1]<=t)
        {
            if(arr[i][0]<max)
            max=arr[i][0];
            f=1;
        }
    }
    if(f==-1)
    System.out.println("TLE");
    else
    System.out.println(max);
}
}
class FastReader {
 
    byte[] buf = new byte[2048];
    int index, total;
    InputStream in;
 
    FastReader(InputStream is) {
        in = is;
    }
 
    int scan() throws IOException {
        if (index >= total) {
            index = 0;
            total = in.read(buf);
            if (total <= 0) {
                return -1;
            }
        }
        return buf[index++];
    }
 
    String next() throws IOException {
        int c;
        for (c = scan(); c <= 32; c = scan());
        StringBuilder sb = new StringBuilder();
        for (; c > 32; c = scan()) {
            sb.append((char) c);
        }
        return sb.toString();
    }
    String nextLine() throws IOException {
        int c;
        for (c = scan(); c <= 32; c = scan());
        StringBuilder sb = new StringBuilder();
        for (; c !=10; c = scan()) {
            sb.append((char) c);
        }
        return sb.toString();
    }
    char nextChar() throws IOException{
        int c;
         for (c = scan(); c <= 32; c = scan());
         return (char)c;
        }
 
    int nextInt() throws IOException {
        int c, val = 0;
        for (c = scan(); c <= 32; c = scan());
        boolean neg = c == '-';
        if (c == '-' || c == '+') {
            c = scan();
        }
        for (; c >= '0' && c <= '9'; c = scan()) {
            val = (val << 3) + (val << 1) + (c & 15);
        }
        return neg ? -val : val;
    }
 
    long nextLong() throws IOException {
        int c;
        long val = 0;
        for (c = scan(); c <= 32; c = scan());
        boolean neg = c == '-';
        if (c == '-' || c == '+') {
            c = scan();
        }
        for (; c >= '0' && c <= '9'; c = scan()) {
            val = (val << 3) + (val << 1) + (c & 15);
        }
        return neg ? -val : val;
    }
}