import java.io.BufferedReader;
import java.io.InputStreamReader;

public class Main
{

  public static void main
  (
    String[] args
  )
  {
    BufferedReader in_stream;
    String         in_str;
    String[]       in_str_split;

    int in_N;
    int in_T;

    int c;
    int t;
    int cnt;
    int ans;

    ans = 9999;

    try
    {
      in_stream = new BufferedReader(new InputStreamReader(System.in));

      /*----------------
       * 引数
       *----------------*/
      in_str       = new String(in_stream.readLine());
      in_str_split = in_str.split(" ");
      in_N         = Integer.parseInt(in_str_split[0]);
      in_T         = Integer.parseInt(in_str_split[1]);

      for(cnt=0; cnt<in_N; cnt++)
      {
        in_str       = new String(in_stream.readLine());
        in_str_split = in_str.split(" ");
        c            = Integer.parseInt(in_str_split[0]);
        t            = Integer.parseInt(in_str_split[1]);

        if(t <= in_T)
        {
          if(c < ans)
          {
            ans = c;
          }
        }
      }

      /*----------------
       * 計算
       *----------------*/
      if(9999 == ans)
      {
        System.out.println("TLE");
      }
      else
      {
        System.out.println(String.valueOf(ans));
      }
    }
    catch(Exception e)
    {
      e.printStackTrace();
    }
  }
} import java.io.BufferedReader; BufferedReader java.io import java.io.InputStreamReader; InputStreamReader java.io public class Main
{

  public static void main
  (
    String[] args
  )
  {
    BufferedReader in_stream;
    String         in_str;
    String[]       in_str_split;

    int in_N;
    int in_T;

    int c;
    int t;
    int cnt;
    int ans;

    ans = 9999;

    try
    {
      in_stream = new BufferedReader(new InputStreamReader(System.in));

      /*----------------
       * 引数
       *----------------*/
      in_str       = new String(in_stream.readLine());
      in_str_split = in_str.split(" ");
      in_N         = Integer.parseInt(in_str_split[0]);
      in_T         = Integer.parseInt(in_str_split[1]);

      for(cnt=0; cnt<in_N; cnt++)
      {
        in_str       = new String(in_stream.readLine());
        in_str_split = in_str.split(" ");
        c            = Integer.parseInt(in_str_split[0]);
        t            = Integer.parseInt(in_str_split[1]);

        if(t <= in_T)
        {
          if(c < ans)
          {
            ans = c;
          }
        }
      }

      /*----------------
       * 計算
       *----------------*/
      if(9999 == ans)
      {
        System.out.println("TLE");
      }
      else
      {
        System.out.println(String.valueOf(ans));
      }
    }
    catch(Exception e)
    {
      e.printStackTrace();
    }
  }
} Main public static void main
  (
    String[] args
  )
  {
    BufferedReader in_stream;
    String         in_str;
    String[]       in_str_split;

    int in_N;
    int in_T;

    int c;
    int t;
    int cnt;
    int ans;

    ans = 9999;

    try
    {
      in_stream = new BufferedReader(new InputStreamReader(System.in));

      /*----------------
       * 引数
       *----------------*/
      in_str       = new String(in_stream.readLine());
      in_str_split = in_str.split(" ");
      in_N         = Integer.parseInt(in_str_split[0]);
      in_T         = Integer.parseInt(in_str_split[1]);

      for(cnt=0; cnt<in_N; cnt++)
      {
        in_str       = new String(in_stream.readLine());
        in_str_split = in_str.split(" ");
        c            = Integer.parseInt(in_str_split[0]);
        t            = Integer.parseInt(in_str_split[1]);

        if(t <= in_T)
        {
          if(c < ans)
          {
            ans = c;
          }
        }
      }

      /*----------------
       * 計算
       *----------------*/
      if(9999 == ans)
      {
        System.out.println("TLE");
      }
      else
      {
        System.out.println(String.valueOf(ans));
      }
    }
    catch(Exception e)
    {
      e.printStackTrace();
    }
  } main {
    BufferedReader in_stream;
    String         in_str;
    String[]       in_str_split;

    int in_N;
    int in_T;

    int c;
    int t;
    int cnt;
    int ans;

    ans = 9999;

    try
    {
      in_stream = new BufferedReader(new InputStreamReader(System.in));

      /*----------------
       * 引数
       *----------------*/
      in_str       = new String(in_stream.readLine());
      in_str_split = in_str.split(" ");
      in_N         = Integer.parseInt(in_str_split[0]);
      in_T         = Integer.parseInt(in_str_split[1]);

      for(cnt=0; cnt<in_N; cnt++)
      {
        in_str       = new String(in_stream.readLine());
        in_str_split = in_str.split(" ");
        c            = Integer.parseInt(in_str_split[0]);
        t            = Integer.parseInt(in_str_split[1]);

        if(t <= in_T)
        {
          if(c < ans)
          {
            ans = c;
          }
        }
      }

      /*----------------
       * 計算
       *----------------*/
      if(9999 == ans)
      {
        System.out.println("TLE");
      }
      else
      {
        System.out.println(String.valueOf(ans));
      }
    }
    catch(Exception e)
    {
      e.printStackTrace();
    }
  } BufferedReader in_stream; in_stream String         in_str; in_str String[]       in_str_split; in_str_split int in_N; in_N int in_T; in_T int c; c int t; t int cnt; cnt int ans; ans ans = 9999 ans 9999 try
    {
      in_stream = new BufferedReader(new InputStreamReader(System.in));

      /*----------------
       * 引数
       *----------------*/
      in_str       = new String(in_stream.readLine());
      in_str_split = in_str.split(" ");
      in_N         = Integer.parseInt(in_str_split[0]);
      in_T         = Integer.parseInt(in_str_split[1]);

      for(cnt=0; cnt<in_N; cnt++)
      {
        in_str       = new String(in_stream.readLine());
        in_str_split = in_str.split(" ");
        c            = Integer.parseInt(in_str_split[0]);
        t            = Integer.parseInt(in_str_split[1]);

        if(t <= in_T)
        {
          if(c < ans)
          {
            ans = c;
          }
        }
      }

      /*----------------
       * 計算
       *----------------*/
      if(9999 == ans)
      {
        System.out.println("TLE");
      }
      else
      {
        System.out.println(String.valueOf(ans));
      }
    }
    catch(Exception e)
    {
      e.printStackTrace();
    } catch(Exception e)
    {
      e.printStackTrace();
    } Exception e {
      e.printStackTrace();
    } e.printStackTrace() e.printStackTrace e {
      in_stream = new BufferedReader(new InputStreamReader(System.in));

      /*----------------
       * 引数
       *----------------*/
      in_str       = new String(in_stream.readLine());
      in_str_split = in_str.split(" ");
      in_N         = Integer.parseInt(in_str_split[0]);
      in_T         = Integer.parseInt(in_str_split[1]);

      for(cnt=0; cnt<in_N; cnt++)
      {
        in_str       = new String(in_stream.readLine());
        in_str_split = in_str.split(" ");
        c            = Integer.parseInt(in_str_split[0]);
        t            = Integer.parseInt(in_str_split[1]);

        if(t <= in_T)
        {
          if(c < ans)
          {
            ans = c;
          }
        }
      }

      /*----------------
       * 計算
       *----------------*/
      if(9999 == ans)
      {
        System.out.println("TLE");
      }
      else
      {
        System.out.println(String.valueOf(ans));
      }
    } in_stream = new BufferedReader(new InputStreamReader(System.in)) in_stream new BufferedReader(new InputStreamReader(System.in)) in_str       = new String(in_stream.readLine()) in_str new String(in_stream.readLine()) in_str_split = in_str.split(" ") in_str_split in_str.split(" ") in_str.split in_str " " in_N         = Integer.parseInt(in_str_split[0]) in_N Integer.parseInt(in_str_split[0]) Integer.parseInt Integer in_str_split[0] in_str_split 0 in_T         = Integer.parseInt(in_str_split[1]) in_T Integer.parseInt(in_str_split[1]) Integer.parseInt Integer in_str_split[1] in_str_split 1 for(cnt=0; cnt<in_N; cnt++)
      {
        in_str       = new String(in_stream.readLine());
        in_str_split = in_str.split(" ");
        c            = Integer.parseInt(in_str_split[0]);
        t            = Integer.parseInt(in_str_split[1]);

        if(t <= in_T)
        {
          if(c < ans)
          {
            ans = c;
          }
        }
      } cnt=0; cnt=0 cnt 0 cnt<in_N cnt in_N cnt++ cnt++ cnt {
        in_str       = new String(in_stream.readLine());
        in_str_split = in_str.split(" ");
        c            = Integer.parseInt(in_str_split[0]);
        t            = Integer.parseInt(in_str_split[1]);

        if(t <= in_T)
        {
          if(c < ans)
          {
            ans = c;
          }
        }
      } {
        in_str       = new String(in_stream.readLine());
        in_str_split = in_str.split(" ");
        c            = Integer.parseInt(in_str_split[0]);
        t            = Integer.parseInt(in_str_split[1]);

        if(t <= in_T)
        {
          if(c < ans)
          {
            ans = c;
          }
        }
      } in_str       = new String(in_stream.readLine()) in_str new String(in_stream.readLine()) in_str_split = in_str.split(" ") in_str_split in_str.split(" ") in_str.split in_str " " c            = Integer.parseInt(in_str_split[0]) c Integer.parseInt(in_str_split[0]) Integer.parseInt Integer in_str_split[0] in_str_split 0 t            = Integer.parseInt(in_str_split[1]) t Integer.parseInt(in_str_split[1]) Integer.parseInt Integer in_str_split[1] in_str_split 1 if(t <= in_T)
        {
          if(c < ans)
          {
            ans = c;
          }
        } t <= in_T t in_T {
          if(c < ans)
          {
            ans = c;
          }
        } if(c < ans)
          {
            ans = c;
          } c < ans c ans {
            ans = c;
          } ans = c ans c if(9999 == ans)
      {
        System.out.println("TLE");
      }
      else
      {
        System.out.println(String.valueOf(ans));
      } 9999 == ans 9999 ans {
        System.out.println("TLE");
      } System.out.println("TLE") System.out.println System.out System System.out "TLE" {
        System.out.println(String.valueOf(ans));
      } System.out.println(String.valueOf(ans)) System.out.println System.out System System.out String.valueOf(ans) String.valueOf String ans String[] args args public class Main
{

  public static void main
  (
    String[] args
  )
  {
    BufferedReader in_stream;
    String         in_str;
    String[]       in_str_split;

    int in_N;
    int in_T;

    int c;
    int t;
    int cnt;
    int ans;

    ans = 9999;

    try
    {
      in_stream = new BufferedReader(new InputStreamReader(System.in));

      /*----------------
       * 引数
       *----------------*/
      in_str       = new String(in_stream.readLine());
      in_str_split = in_str.split(" ");
      in_N         = Integer.parseInt(in_str_split[0]);
      in_T         = Integer.parseInt(in_str_split[1]);

      for(cnt=0; cnt<in_N; cnt++)
      {
        in_str       = new String(in_stream.readLine());
        in_str_split = in_str.split(" ");
        c            = Integer.parseInt(in_str_split[0]);
        t            = Integer.parseInt(in_str_split[1]);

        if(t <= in_T)
        {
          if(c < ans)
          {
            ans = c;
          }
        }
      }

      /*----------------
       * 計算
       *----------------*/
      if(9999 == ans)
      {
        System.out.println("TLE");
      }
      else
      {
        System.out.println(String.valueOf(ans));
      }
    }
    catch(Exception e)
    {
      e.printStackTrace();
    }
  }
} public class Main
{

  public static void main
  (
    String[] args
  )
  {
    BufferedReader in_stream;
    String         in_str;
    String[]       in_str_split;

    int in_N;
    int in_T;

    int c;
    int t;
    int cnt;
    int ans;

    ans = 9999;

    try
    {
      in_stream = new BufferedReader(new InputStreamReader(System.in));

      /*----------------
       * 引数
       *----------------*/
      in_str       = new String(in_stream.readLine());
      in_str_split = in_str.split(" ");
      in_N         = Integer.parseInt(in_str_split[0]);
      in_T         = Integer.parseInt(in_str_split[1]);

      for(cnt=0; cnt<in_N; cnt++)
      {
        in_str       = new String(in_stream.readLine());
        in_str_split = in_str.split(" ");
        c            = Integer.parseInt(in_str_split[0]);
        t            = Integer.parseInt(in_str_split[1]);

        if(t <= in_T)
        {
          if(c < ans)
          {
            ans = c;
          }
        }
      }

      /*----------------
       * 計算
       *----------------*/
      if(9999 == ans)
      {
        System.out.println("TLE");
      }
      else
      {
        System.out.println(String.valueOf(ans));
      }
    }
    catch(Exception e)
    {
      e.printStackTrace();
    }
  }
} Main
import java.io.BufferedReader;
import java.io.InputStreamReader;

public class Main
{

  public static void main
  (
    String[] args
  )
  {
    BufferedReader in_stream;
    String         in_str;
    String[]       in_str_split;

    int in_N;
    int in_T;

    int c;
    int t;
    int cnt;
    int ans;

    ans = 9999;

    try
    {
      in_stream = new BufferedReader(new InputStreamReader(System.in));

      /*----------------
       * 引数
       *----------------*/
      in_str       = new String(in_stream.readLine());
      in_str_split = in_str.split(" ");
      in_N         = Integer.parseInt(in_str_split[0]);
      in_T         = Integer.parseInt(in_str_split[1]);

      for(cnt=0; cnt<in_N; cnt++)
      {
        in_str       = new String(in_stream.readLine());
        in_str_split = in_str.split(" ");
        c            = Integer.parseInt(in_str_split[0]);
        t            = Integer.parseInt(in_str_split[1]);

        if(t <= in_T)
        {
          if(c < ans)
          {
            ans = c;
          }
        }
      }

      /*----------------
       * 計算
       *----------------*/
      if(9999 == ans)
      {
        System.out.println("TLE");
      }
      else
      {
        System.out.println(String.valueOf(ans));
      }
    }
    catch(Exception e)
    {
      e.printStackTrace();
    }
  }
}
