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

public class Main {
  public static void main(String[] args) {
    Main main = new Main();
    try {
      main.run(args);
    } catch (Exception e) {
      e.printStackTrace();
    }
  }

  private void run(String[] arguments) throws Exception {
    MyScanner sc = new MyScanner();
    PrintWriter out = new PrintWriter(new BufferedOutputStream(System.out));

    int n = sc.nextInt();
    int MAX_TIME = sc.nextInt();
    int min = Integer.MAX_VALUE;

    for (int i = 0; i < n; i++) {
      int cost = sc.nextInt();
      int time = sc.nextInt();
      if (time<=MAX_TIME && cost<min){
        min = cost;
      }
    }

    if (min==Integer.MAX_VALUE){
      out.println("TLE");
      out.close();
      return;
    }

    out.println(min);
    out.close();
  }

  /*
   * Form: http://codeforces.com/blog/entry/7018
   */
  private class MyScanner {
    BufferedReader br;
    StringTokenizer st;

    MyScanner() {
      br = new BufferedReader(new InputStreamReader(System.in));
    }

    String next() {
      while (st == null || !st.hasMoreElements()) {
        try {
          st = new StringTokenizer(br.readLine());
        } catch (IOException e) {
          e.printStackTrace();
        }
      }
      return st.nextToken();
    }

    int nextInt() {
      return Integer.parseInt(next());
    }

    long nextLong() {
      return Long.parseLong(next());
    }

    double nextDouble() {
      return Double.parseDouble(next());
    }

    String nextLine() {
      String str = "";
      try {
        str = br.readLine();
      } catch (IOException e) {
        e.printStackTrace();
      }
      return str;
    }
  }
} import java.io.*; io.* java import java.util.StringTokenizer; StringTokenizer java.util public class Main {
  public static void main(String[] args) {
    Main main = new Main();
    try {
      main.run(args);
    } catch (Exception e) {
      e.printStackTrace();
    }
  }

  private void run(String[] arguments) throws Exception {
    MyScanner sc = new MyScanner();
    PrintWriter out = new PrintWriter(new BufferedOutputStream(System.out));

    int n = sc.nextInt();
    int MAX_TIME = sc.nextInt();
    int min = Integer.MAX_VALUE;

    for (int i = 0; i < n; i++) {
      int cost = sc.nextInt();
      int time = sc.nextInt();
      if (time<=MAX_TIME && cost<min){
        min = cost;
      }
    }

    if (min==Integer.MAX_VALUE){
      out.println("TLE");
      out.close();
      return;
    }

    out.println(min);
    out.close();
  }

  /*
   * Form: http://codeforces.com/blog/entry/7018
   */
  private class MyScanner {
    BufferedReader br;
    StringTokenizer st;

    MyScanner() {
      br = new BufferedReader(new InputStreamReader(System.in));
    }

    String next() {
      while (st == null || !st.hasMoreElements()) {
        try {
          st = new StringTokenizer(br.readLine());
        } catch (IOException e) {
          e.printStackTrace();
        }
      }
      return st.nextToken();
    }

    int nextInt() {
      return Integer.parseInt(next());
    }

    long nextLong() {
      return Long.parseLong(next());
    }

    double nextDouble() {
      return Double.parseDouble(next());
    }

    String nextLine() {
      String str = "";
      try {
        str = br.readLine();
      } catch (IOException e) {
        e.printStackTrace();
      }
      return str;
    }
  }
} Main public static void main(String[] args) {
    Main main = new Main();
    try {
      main.run(args);
    } catch (Exception e) {
      e.printStackTrace();
    }
  } main {
    Main main = new Main();
    try {
      main.run(args);
    } catch (Exception e) {
      e.printStackTrace();
    }
  } Main main = new Main(); main new Main() try {
      main.run(args);
    } catch (Exception e) {
      e.printStackTrace();
    } catch (Exception e) {
      e.printStackTrace();
    } Exception e {
      e.printStackTrace();
    } e.printStackTrace() e.printStackTrace e {
      main.run(args);
    } main.run(args) main.run main args String[] args args private void run(String[] arguments) throws Exception {
    MyScanner sc = new MyScanner();
    PrintWriter out = new PrintWriter(new BufferedOutputStream(System.out));

    int n = sc.nextInt();
    int MAX_TIME = sc.nextInt();
    int min = Integer.MAX_VALUE;

    for (int i = 0; i < n; i++) {
      int cost = sc.nextInt();
      int time = sc.nextInt();
      if (time<=MAX_TIME && cost<min){
        min = cost;
      }
    }

    if (min==Integer.MAX_VALUE){
      out.println("TLE");
      out.close();
      return;
    }

    out.println(min);
    out.close();
  } run {
    MyScanner sc = new MyScanner();
    PrintWriter out = new PrintWriter(new BufferedOutputStream(System.out));

    int n = sc.nextInt();
    int MAX_TIME = sc.nextInt();
    int min = Integer.MAX_VALUE;

    for (int i = 0; i < n; i++) {
      int cost = sc.nextInt();
      int time = sc.nextInt();
      if (time<=MAX_TIME && cost<min){
        min = cost;
      }
    }

    if (min==Integer.MAX_VALUE){
      out.println("TLE");
      out.close();
      return;
    }

    out.println(min);
    out.close();
  } MyScanner sc = new MyScanner(); sc new MyScanner() PrintWriter out = new PrintWriter(new BufferedOutputStream(System.out)); out new PrintWriter(new BufferedOutputStream(System.out)) int n = sc.nextInt(); n sc.nextInt() sc.nextInt sc int MAX_TIME = sc.nextInt(); MAX_TIME sc.nextInt() sc.nextInt sc int min = Integer.MAX_VALUE; min Integer.MAX_VALUE Integer Integer.MAX_VALUE for (int i = 0; i < n; i++) {
      int cost = sc.nextInt();
      int time = sc.nextInt();
      if (time<=MAX_TIME && cost<min){
        min = cost;
      }
    } int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
      int cost = sc.nextInt();
      int time = sc.nextInt();
      if (time<=MAX_TIME && cost<min){
        min = cost;
      }
    } {
      int cost = sc.nextInt();
      int time = sc.nextInt();
      if (time<=MAX_TIME && cost<min){
        min = cost;
      }
    } int cost = sc.nextInt(); cost sc.nextInt() sc.nextInt sc int time = sc.nextInt(); time sc.nextInt() sc.nextInt sc if (time<=MAX_TIME && cost<min){
        min = cost;
      } time<=MAX_TIME && cost<min time<=MAX_TIME time MAX_TIME cost<min cost min {
        min = cost;
      } min = cost min cost if (min==Integer.MAX_VALUE){
      out.println("TLE");
      out.close();
      return;
    } min==Integer.MAX_VALUE min Integer.MAX_VALUE Integer Integer.MAX_VALUE {
      out.println("TLE");
      out.close();
      return;
    } out.println("TLE") out.println out "TLE" out.close() out.close out return; out.println(min) out.println out min out.close() out.close out String[] arguments arguments private class MyScanner {
    BufferedReader br;
    StringTokenizer st;

    MyScanner() {
      br = new BufferedReader(new InputStreamReader(System.in));
    }

    String next() {
      while (st == null || !st.hasMoreElements()) {
        try {
          st = new StringTokenizer(br.readLine());
        } catch (IOException e) {
          e.printStackTrace();
        }
      }
      return st.nextToken();
    }

    int nextInt() {
      return Integer.parseInt(next());
    }

    long nextLong() {
      return Long.parseLong(next());
    }

    double nextDouble() {
      return Double.parseDouble(next());
    }

    String nextLine() {
      String str = "";
      try {
        str = br.readLine();
      } catch (IOException e) {
        e.printStackTrace();
      }
      return str;
    }
  } MyScanner BufferedReader br; br StringTokenizer st; st MyScanner() {
      br = new BufferedReader(new InputStreamReader(System.in));
    } MyScanner {
      br = new BufferedReader(new InputStreamReader(System.in));
    } br = new BufferedReader(new InputStreamReader(System.in)) br new BufferedReader(new InputStreamReader(System.in)) String next() {
      while (st == null || !st.hasMoreElements()) {
        try {
          st = new StringTokenizer(br.readLine());
        } catch (IOException e) {
          e.printStackTrace();
        }
      }
      return st.nextToken();
    } next {
      while (st == null || !st.hasMoreElements()) {
        try {
          st = new StringTokenizer(br.readLine());
        } catch (IOException e) {
          e.printStackTrace();
        }
      }
      return st.nextToken();
    } while (st == null || !st.hasMoreElements()) {
        try {
          st = new StringTokenizer(br.readLine());
        } catch (IOException e) {
          e.printStackTrace();
        }
      } st == null || !st.hasMoreElements() st == null st null !st.hasMoreElements() st.hasMoreElements() st.hasMoreElements st {
        try {
          st = new StringTokenizer(br.readLine());
        } catch (IOException e) {
          e.printStackTrace();
        }
      } try {
          st = new StringTokenizer(br.readLine());
        } catch (IOException e) {
          e.printStackTrace();
        } catch (IOException e) {
          e.printStackTrace();
        } IOException e {
          e.printStackTrace();
        } e.printStackTrace() e.printStackTrace e {
          st = new StringTokenizer(br.readLine());
        } st = new StringTokenizer(br.readLine()) st new StringTokenizer(br.readLine()) return st.nextToken(); st.nextToken() st.nextToken st int nextInt() {
      return Integer.parseInt(next());
    } nextInt {
      return Integer.parseInt(next());
    } return Integer.parseInt(next()); Integer.parseInt(next()) Integer.parseInt Integer next() next long nextLong() {
      return Long.parseLong(next());
    } nextLong {
      return Long.parseLong(next());
    } return Long.parseLong(next()); Long.parseLong(next()) Long.parseLong Long next() next double nextDouble() {
      return Double.parseDouble(next());
    } nextDouble {
      return Double.parseDouble(next());
    } return Double.parseDouble(next()); Double.parseDouble(next()) Double.parseDouble Double next() next String nextLine() {
      String str = "";
      try {
        str = br.readLine();
      } catch (IOException e) {
        e.printStackTrace();
      }
      return str;
    } nextLine {
      String str = "";
      try {
        str = br.readLine();
      } catch (IOException e) {
        e.printStackTrace();
      }
      return str;
    } String str = ""; str "" try {
        str = br.readLine();
      } catch (IOException e) {
        e.printStackTrace();
      } catch (IOException e) {
        e.printStackTrace();
      } IOException e {
        e.printStackTrace();
      } e.printStackTrace() e.printStackTrace e {
        str = br.readLine();
      } str = br.readLine() str br.readLine() br.readLine br return str; str public class Main {
  public static void main(String[] args) {
    Main main = new Main();
    try {
      main.run(args);
    } catch (Exception e) {
      e.printStackTrace();
    }
  }

  private void run(String[] arguments) throws Exception {
    MyScanner sc = new MyScanner();
    PrintWriter out = new PrintWriter(new BufferedOutputStream(System.out));

    int n = sc.nextInt();
    int MAX_TIME = sc.nextInt();
    int min = Integer.MAX_VALUE;

    for (int i = 0; i < n; i++) {
      int cost = sc.nextInt();
      int time = sc.nextInt();
      if (time<=MAX_TIME && cost<min){
        min = cost;
      }
    }

    if (min==Integer.MAX_VALUE){
      out.println("TLE");
      out.close();
      return;
    }

    out.println(min);
    out.close();
  }

  /*
   * Form: http://codeforces.com/blog/entry/7018
   */
  private class MyScanner {
    BufferedReader br;
    StringTokenizer st;

    MyScanner() {
      br = new BufferedReader(new InputStreamReader(System.in));
    }

    String next() {
      while (st == null || !st.hasMoreElements()) {
        try {
          st = new StringTokenizer(br.readLine());
        } catch (IOException e) {
          e.printStackTrace();
        }
      }
      return st.nextToken();
    }

    int nextInt() {
      return Integer.parseInt(next());
    }

    long nextLong() {
      return Long.parseLong(next());
    }

    double nextDouble() {
      return Double.parseDouble(next());
    }

    String nextLine() {
      String str = "";
      try {
        str = br.readLine();
      } catch (IOException e) {
        e.printStackTrace();
      }
      return str;
    }
  }
} public class Main {
  public static void main(String[] args) {
    Main main = new Main();
    try {
      main.run(args);
    } catch (Exception e) {
      e.printStackTrace();
    }
  }

  private void run(String[] arguments) throws Exception {
    MyScanner sc = new MyScanner();
    PrintWriter out = new PrintWriter(new BufferedOutputStream(System.out));

    int n = sc.nextInt();
    int MAX_TIME = sc.nextInt();
    int min = Integer.MAX_VALUE;

    for (int i = 0; i < n; i++) {
      int cost = sc.nextInt();
      int time = sc.nextInt();
      if (time<=MAX_TIME && cost<min){
        min = cost;
      }
    }

    if (min==Integer.MAX_VALUE){
      out.println("TLE");
      out.close();
      return;
    }

    out.println(min);
    out.close();
  }

  /*
   * Form: http://codeforces.com/blog/entry/7018
   */
  private class MyScanner {
    BufferedReader br;
    StringTokenizer st;

    MyScanner() {
      br = new BufferedReader(new InputStreamReader(System.in));
    }

    String next() {
      while (st == null || !st.hasMoreElements()) {
        try {
          st = new StringTokenizer(br.readLine());
        } catch (IOException e) {
          e.printStackTrace();
        }
      }
      return st.nextToken();
    }

    int nextInt() {
      return Integer.parseInt(next());
    }

    long nextLong() {
      return Long.parseLong(next());
    }

    double nextDouble() {
      return Double.parseDouble(next());
    }

    String nextLine() {
      String str = "";
      try {
        str = br.readLine();
      } catch (IOException e) {
        e.printStackTrace();
      }
      return str;
    }
  }
} Main
import java.io.*;
import java.util.StringTokenizer;

public class Main {
  public static void main(String[] args) {
    Main main = new Main();
    try {
      main.run(args);
    } catch (Exception e) {
      e.printStackTrace();
    }
  }

  private void run(String[] arguments) throws Exception {
    MyScanner sc = new MyScanner();
    PrintWriter out = new PrintWriter(new BufferedOutputStream(System.out));

    int n = sc.nextInt();
    int MAX_TIME = sc.nextInt();
    int min = Integer.MAX_VALUE;

    for (int i = 0; i < n; i++) {
      int cost = sc.nextInt();
      int time = sc.nextInt();
      if (time<=MAX_TIME && cost<min){
        min = cost;
      }
    }

    if (min==Integer.MAX_VALUE){
      out.println("TLE");
      out.close();
      return;
    }

    out.println(min);
    out.close();
  }

  /*
   * Form: http://codeforces.com/blog/entry/7018
   */
  private class MyScanner {
    BufferedReader br;
    StringTokenizer st;

    MyScanner() {
      br = new BufferedReader(new InputStreamReader(System.in));
    }

    String next() {
      while (st == null || !st.hasMoreElements()) {
        try {
          st = new StringTokenizer(br.readLine());
        } catch (IOException e) {
          e.printStackTrace();
        }
      }
      return st.nextToken();
    }

    int nextInt() {
      return Integer.parseInt(next());
    }

    long nextLong() {
      return Long.parseLong(next());
    }

    double nextDouble() {
      return Double.parseDouble(next());
    }

    String nextLine() {
      String str = "";
      try {
        str = br.readLine();
      } catch (IOException e) {
        e.printStackTrace();
      }
      return str;
    }
  }
}
