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

public class Main{
  public static void main(String[] args){
    Scanner scan = new Scanner(System.in);
    int N = scan.nextInt();
    int T = scan.nextInt();
    int MinCost = 0;
    boolean flag = false;

    int[][] d = new int[N][2];
    for(int i = 0; i < N; i++){
      d[i][0] = scan.nextInt();
      d[i][1] = scan.nextInt();
      if(d[i][1] <= T){
        flag = true;
        MinCost = d[i][0];
      }
    }


    if(flag == false){
      System.out.println("TLE");
    }else{
      for(int i = 0; i < N ; i++){
        if((T >= d[i][1])&&(MinCost > d[i][0]))
          MinCost = d[i][0];
      }
      System.out.println(MinCost);
    }
  }
} import java.util.*; util.* java import java.io.*; io.* java public class Main{
  public static void main(String[] args){
    Scanner scan = new Scanner(System.in);
    int N = scan.nextInt();
    int T = scan.nextInt();
    int MinCost = 0;
    boolean flag = false;

    int[][] d = new int[N][2];
    for(int i = 0; i < N; i++){
      d[i][0] = scan.nextInt();
      d[i][1] = scan.nextInt();
      if(d[i][1] <= T){
        flag = true;
        MinCost = d[i][0];
      }
    }


    if(flag == false){
      System.out.println("TLE");
    }else{
      for(int i = 0; i < N ; i++){
        if((T >= d[i][1])&&(MinCost > d[i][0]))
          MinCost = d[i][0];
      }
      System.out.println(MinCost);
    }
  }
} Main public static void main(String[] args){
    Scanner scan = new Scanner(System.in);
    int N = scan.nextInt();
    int T = scan.nextInt();
    int MinCost = 0;
    boolean flag = false;

    int[][] d = new int[N][2];
    for(int i = 0; i < N; i++){
      d[i][0] = scan.nextInt();
      d[i][1] = scan.nextInt();
      if(d[i][1] <= T){
        flag = true;
        MinCost = d[i][0];
      }
    }


    if(flag == false){
      System.out.println("TLE");
    }else{
      for(int i = 0; i < N ; i++){
        if((T >= d[i][1])&&(MinCost > d[i][0]))
          MinCost = d[i][0];
      }
      System.out.println(MinCost);
    }
  } main {
    Scanner scan = new Scanner(System.in);
    int N = scan.nextInt();
    int T = scan.nextInt();
    int MinCost = 0;
    boolean flag = false;

    int[][] d = new int[N][2];
    for(int i = 0; i < N; i++){
      d[i][0] = scan.nextInt();
      d[i][1] = scan.nextInt();
      if(d[i][1] <= T){
        flag = true;
        MinCost = d[i][0];
      }
    }


    if(flag == false){
      System.out.println("TLE");
    }else{
      for(int i = 0; i < N ; i++){
        if((T >= d[i][1])&&(MinCost > d[i][0]))
          MinCost = d[i][0];
      }
      System.out.println(MinCost);
    }
  } Scanner scan = new Scanner(System.in); scan new Scanner(System.in) int N = scan.nextInt(); N scan.nextInt() scan.nextInt scan int T = scan.nextInt(); T scan.nextInt() scan.nextInt scan int MinCost = 0; MinCost 0 boolean flag = false; flag false int[][] d = new int[N][2]; d new int[N][2] N 2 for(int i = 0; i < N; i++){
      d[i][0] = scan.nextInt();
      d[i][1] = scan.nextInt();
      if(d[i][1] <= T){
        flag = true;
        MinCost = d[i][0];
      }
    } int i = 0; int i = 0; i 0 i < N i N i++ i++ i {
      d[i][0] = scan.nextInt();
      d[i][1] = scan.nextInt();
      if(d[i][1] <= T){
        flag = true;
        MinCost = d[i][0];
      }
    } {
      d[i][0] = scan.nextInt();
      d[i][1] = scan.nextInt();
      if(d[i][1] <= T){
        flag = true;
        MinCost = d[i][0];
      }
    } d[i][0] = scan.nextInt() d[i][0] d[i] d i 0 scan.nextInt() scan.nextInt scan d[i][1] = scan.nextInt() d[i][1] d[i] d i 1 scan.nextInt() scan.nextInt scan if(d[i][1] <= T){
        flag = true;
        MinCost = d[i][0];
      } d[i][1] <= T d[i][1] d[i] d i 1 T {
        flag = true;
        MinCost = d[i][0];
      } flag = true flag true MinCost = d[i][0] MinCost d[i][0] d[i] d i 0 if(flag == false){
      System.out.println("TLE");
    }else{
      for(int i = 0; i < N ; i++){
        if((T >= d[i][1])&&(MinCost > d[i][0]))
          MinCost = d[i][0];
      }
      System.out.println(MinCost);
    } flag == false flag false {
      System.out.println("TLE");
    } System.out.println("TLE") System.out.println System.out System System.out "TLE" {
      for(int i = 0; i < N ; i++){
        if((T >= d[i][1])&&(MinCost > d[i][0]))
          MinCost = d[i][0];
      }
      System.out.println(MinCost);
    } for(int i = 0; i < N ; i++){
        if((T >= d[i][1])&&(MinCost > d[i][0]))
          MinCost = d[i][0];
      } int i = 0; int i = 0; i 0 i < N i N i++ i++ i {
        if((T >= d[i][1])&&(MinCost > d[i][0]))
          MinCost = d[i][0];
      } {
        if((T >= d[i][1])&&(MinCost > d[i][0]))
          MinCost = d[i][0];
      } if((T >= d[i][1])&&(MinCost > d[i][0]))
          MinCost = d[i][0]; (T >= d[i][1])&&(MinCost > d[i][0]) (T >= d[i][1]) T d[i][1] d[i] d i 1 (MinCost > d[i][0]) MinCost d[i][0] d[i] d i 0 MinCost = d[i][0] MinCost d[i][0] d[i] d i 0 System.out.println(MinCost) System.out.println System.out System System.out MinCost String[] args args public class Main{
  public static void main(String[] args){
    Scanner scan = new Scanner(System.in);
    int N = scan.nextInt();
    int T = scan.nextInt();
    int MinCost = 0;
    boolean flag = false;

    int[][] d = new int[N][2];
    for(int i = 0; i < N; i++){
      d[i][0] = scan.nextInt();
      d[i][1] = scan.nextInt();
      if(d[i][1] <= T){
        flag = true;
        MinCost = d[i][0];
      }
    }


    if(flag == false){
      System.out.println("TLE");
    }else{
      for(int i = 0; i < N ; i++){
        if((T >= d[i][1])&&(MinCost > d[i][0]))
          MinCost = d[i][0];
      }
      System.out.println(MinCost);
    }
  }
} public class Main{
  public static void main(String[] args){
    Scanner scan = new Scanner(System.in);
    int N = scan.nextInt();
    int T = scan.nextInt();
    int MinCost = 0;
    boolean flag = false;

    int[][] d = new int[N][2];
    for(int i = 0; i < N; i++){
      d[i][0] = scan.nextInt();
      d[i][1] = scan.nextInt();
      if(d[i][1] <= T){
        flag = true;
        MinCost = d[i][0];
      }
    }


    if(flag == false){
      System.out.println("TLE");
    }else{
      for(int i = 0; i < N ; i++){
        if((T >= d[i][1])&&(MinCost > d[i][0]))
          MinCost = d[i][0];
      }
      System.out.println(MinCost);
    }
  }
} Main
import java.util.*;
import java.io.*;

public class Main{
  public static void main(String[] args){
    Scanner scan = new Scanner(System.in);
    int N = scan.nextInt();
    int T = scan.nextInt();
    int MinCost = 0;
    boolean flag = false;

    int[][] d = new int[N][2];
    for(int i = 0; i < N; i++){
      d[i][0] = scan.nextInt();
      d[i][1] = scan.nextInt();
      if(d[i][1] <= T){
        flag = true;
        MinCost = d[i][0];
      }
    }


    if(flag == false){
      System.out.println("TLE");
    }else{
      for(int i = 0; i < N ; i++){
        if((T >= d[i][1])&&(MinCost > d[i][0]))
          MinCost = d[i][0];
      }
      System.out.println(MinCost);
    }
  }
}
