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

public class Main{
  public static void main(String[] args){
    try {
      Scanner sc = new Scanner(System.in);
      int n, T;
      n=Integer.parseInt(sc.next());
      T=Integer.parseInt(sc.next());
      int[] c = new int[n];
      int[] t = new int[n];

      for(int i=0; i<n; i++){
        c[i]=Integer.parseInt(sc.next());
        t[i]=Integer.parseInt(sc.next());
      }

      int ans=1001;
      for(int i=0; i<n; i++){
        if(t[i]<=T){
          if(c[i]<ans){
            ans=c[i];
          }
        }
      }

      if(ans==1001){
        System.out.println("TLE");
      }else{
        System.out.println(ans);
      }
      
      
      }catch (Exception e) {
      System.out.println("out");
    }
  }
} import java.io.*; io.* java import java.util.*; util.* java public class Main{
  public static void main(String[] args){
    try {
      Scanner sc = new Scanner(System.in);
      int n, T;
      n=Integer.parseInt(sc.next());
      T=Integer.parseInt(sc.next());
      int[] c = new int[n];
      int[] t = new int[n];

      for(int i=0; i<n; i++){
        c[i]=Integer.parseInt(sc.next());
        t[i]=Integer.parseInt(sc.next());
      }

      int ans=1001;
      for(int i=0; i<n; i++){
        if(t[i]<=T){
          if(c[i]<ans){
            ans=c[i];
          }
        }
      }

      if(ans==1001){
        System.out.println("TLE");
      }else{
        System.out.println(ans);
      }
      
      
      }catch (Exception e) {
      System.out.println("out");
    }
  }
} Main public static void main(String[] args){
    try {
      Scanner sc = new Scanner(System.in);
      int n, T;
      n=Integer.parseInt(sc.next());
      T=Integer.parseInt(sc.next());
      int[] c = new int[n];
      int[] t = new int[n];

      for(int i=0; i<n; i++){
        c[i]=Integer.parseInt(sc.next());
        t[i]=Integer.parseInt(sc.next());
      }

      int ans=1001;
      for(int i=0; i<n; i++){
        if(t[i]<=T){
          if(c[i]<ans){
            ans=c[i];
          }
        }
      }

      if(ans==1001){
        System.out.println("TLE");
      }else{
        System.out.println(ans);
      }
      
      
      }catch (Exception e) {
      System.out.println("out");
    }
  } main {
    try {
      Scanner sc = new Scanner(System.in);
      int n, T;
      n=Integer.parseInt(sc.next());
      T=Integer.parseInt(sc.next());
      int[] c = new int[n];
      int[] t = new int[n];

      for(int i=0; i<n; i++){
        c[i]=Integer.parseInt(sc.next());
        t[i]=Integer.parseInt(sc.next());
      }

      int ans=1001;
      for(int i=0; i<n; i++){
        if(t[i]<=T){
          if(c[i]<ans){
            ans=c[i];
          }
        }
      }

      if(ans==1001){
        System.out.println("TLE");
      }else{
        System.out.println(ans);
      }
      
      
      }catch (Exception e) {
      System.out.println("out");
    }
  } try {
      Scanner sc = new Scanner(System.in);
      int n, T;
      n=Integer.parseInt(sc.next());
      T=Integer.parseInt(sc.next());
      int[] c = new int[n];
      int[] t = new int[n];

      for(int i=0; i<n; i++){
        c[i]=Integer.parseInt(sc.next());
        t[i]=Integer.parseInt(sc.next());
      }

      int ans=1001;
      for(int i=0; i<n; i++){
        if(t[i]<=T){
          if(c[i]<ans){
            ans=c[i];
          }
        }
      }

      if(ans==1001){
        System.out.println("TLE");
      }else{
        System.out.println(ans);
      }
      
      
      }catch (Exception e) {
      System.out.println("out");
    } catch (Exception e) {
      System.out.println("out");
    } Exception e {
      System.out.println("out");
    } System.out.println("out") System.out.println System.out System System.out "out" {
      Scanner sc = new Scanner(System.in);
      int n, T;
      n=Integer.parseInt(sc.next());
      T=Integer.parseInt(sc.next());
      int[] c = new int[n];
      int[] t = new int[n];

      for(int i=0; i<n; i++){
        c[i]=Integer.parseInt(sc.next());
        t[i]=Integer.parseInt(sc.next());
      }

      int ans=1001;
      for(int i=0; i<n; i++){
        if(t[i]<=T){
          if(c[i]<ans){
            ans=c[i];
          }
        }
      }

      if(ans==1001){
        System.out.println("TLE");
      }else{
        System.out.println(ans);
      }
      
      
      } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int n n T; T n=Integer.parseInt(sc.next()) n Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc T=Integer.parseInt(sc.next()) T Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next 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]=Integer.parseInt(sc.next());
        t[i]=Integer.parseInt(sc.next());
      } int i=0; int i=0; i 0 i<n i n i++ i++ i {
        c[i]=Integer.parseInt(sc.next());
        t[i]=Integer.parseInt(sc.next());
      } {
        c[i]=Integer.parseInt(sc.next());
        t[i]=Integer.parseInt(sc.next());
      } c[i]=Integer.parseInt(sc.next()) c[i] c i Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc t[i]=Integer.parseInt(sc.next()) t[i] t i Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc int ans=1001; ans 1001 for(int i=0; i<n; i++){
        if(t[i]<=T){
          if(c[i]<ans){
            ans=c[i];
          }
        }
      } int i=0; int i=0; i 0 i<n i n i++ i++ i {
        if(t[i]<=T){
          if(c[i]<ans){
            ans=c[i];
          }
        }
      } {
        if(t[i]<=T){
          if(c[i]<ans){
            ans=c[i];
          }
        }
      } if(t[i]<=T){
          if(c[i]<ans){
            ans=c[i];
          }
        } t[i]<=T t[i] t i T {
          if(c[i]<ans){
            ans=c[i];
          }
        } if(c[i]<ans){
            ans=c[i];
          } c[i]<ans c[i] c i ans {
            ans=c[i];
          } ans=c[i] ans c[i] c i if(ans==1001){
        System.out.println("TLE");
      }else{
        System.out.println(ans);
      } ans==1001 ans 1001 {
        System.out.println("TLE");
      } System.out.println("TLE") System.out.println System.out System System.out "TLE" {
        System.out.println(ans);
      } System.out.println(ans) System.out.println System.out System System.out ans String[] args args public class Main{
  public static void main(String[] args){
    try {
      Scanner sc = new Scanner(System.in);
      int n, T;
      n=Integer.parseInt(sc.next());
      T=Integer.parseInt(sc.next());
      int[] c = new int[n];
      int[] t = new int[n];

      for(int i=0; i<n; i++){
        c[i]=Integer.parseInt(sc.next());
        t[i]=Integer.parseInt(sc.next());
      }

      int ans=1001;
      for(int i=0; i<n; i++){
        if(t[i]<=T){
          if(c[i]<ans){
            ans=c[i];
          }
        }
      }

      if(ans==1001){
        System.out.println("TLE");
      }else{
        System.out.println(ans);
      }
      
      
      }catch (Exception e) {
      System.out.println("out");
    }
  }
} public class Main{
  public static void main(String[] args){
    try {
      Scanner sc = new Scanner(System.in);
      int n, T;
      n=Integer.parseInt(sc.next());
      T=Integer.parseInt(sc.next());
      int[] c = new int[n];
      int[] t = new int[n];

      for(int i=0; i<n; i++){
        c[i]=Integer.parseInt(sc.next());
        t[i]=Integer.parseInt(sc.next());
      }

      int ans=1001;
      for(int i=0; i<n; i++){
        if(t[i]<=T){
          if(c[i]<ans){
            ans=c[i];
          }
        }
      }

      if(ans==1001){
        System.out.println("TLE");
      }else{
        System.out.println(ans);
      }
      
      
      }catch (Exception e) {
      System.out.println("out");
    }
  }
} Main
import java.io.*;
import java.util.*;

public class Main{
  public static void main(String[] args){
    try {
      Scanner sc = new Scanner(System.in);
      int n, T;
      n=Integer.parseInt(sc.next());
      T=Integer.parseInt(sc.next());
      int[] c = new int[n];
      int[] t = new int[n];

      for(int i=0; i<n; i++){
        c[i]=Integer.parseInt(sc.next());
        t[i]=Integer.parseInt(sc.next());
      }

      int ans=1001;
      for(int i=0; i<n; i++){
        if(t[i]<=T){
          if(c[i]<ans){
            ans=c[i];
          }
        }
      }

      if(ans==1001){
        System.out.println("TLE");
      }else{
        System.out.println(ans);
      }
      
      
      }catch (Exception e) {
      System.out.println("out");
    }
  }
}
