import java.util.Scanner;



class Main {
    public static void main(String[] args) {
    	Scanner sc = new Scanner(System.in);
    	int score = 1000;
    	int scorecount =0;
    	int N=sc.nextInt();
    	int T=sc.nextInt();
    	int A[] = new int[N];
		int B[] = new int[N];

    	for(int i = 0;i<N;i++){
    		A[i]= sc.nextInt();
    		B[i]=sc.nextInt();

    	if(A[i]<=score && B[i]<=T){
    		score = A[i];
    		scorecount++;
    	}

    	}
    	if(score == 1000 && scorecount == 0){
    		System.out.println("TLE");
    	}else{
    		System.out.println(score);
    	}



    }
} import java.util.Scanner; Scanner java.util class Main {
    public static void main(String[] args) {
    	Scanner sc = new Scanner(System.in);
    	int score = 1000;
    	int scorecount =0;
    	int N=sc.nextInt();
    	int T=sc.nextInt();
    	int A[] = new int[N];
		int B[] = new int[N];

    	for(int i = 0;i<N;i++){
    		A[i]= sc.nextInt();
    		B[i]=sc.nextInt();

    	if(A[i]<=score && B[i]<=T){
    		score = A[i];
    		scorecount++;
    	}

    	}
    	if(score == 1000 && scorecount == 0){
    		System.out.println("TLE");
    	}else{
    		System.out.println(score);
    	}



    }
} Main public static void main(String[] args) {
    	Scanner sc = new Scanner(System.in);
    	int score = 1000;
    	int scorecount =0;
    	int N=sc.nextInt();
    	int T=sc.nextInt();
    	int A[] = new int[N];
		int B[] = new int[N];

    	for(int i = 0;i<N;i++){
    		A[i]= sc.nextInt();
    		B[i]=sc.nextInt();

    	if(A[i]<=score && B[i]<=T){
    		score = A[i];
    		scorecount++;
    	}

    	}
    	if(score == 1000 && scorecount == 0){
    		System.out.println("TLE");
    	}else{
    		System.out.println(score);
    	}



    } main {
    	Scanner sc = new Scanner(System.in);
    	int score = 1000;
    	int scorecount =0;
    	int N=sc.nextInt();
    	int T=sc.nextInt();
    	int A[] = new int[N];
		int B[] = new int[N];

    	for(int i = 0;i<N;i++){
    		A[i]= sc.nextInt();
    		B[i]=sc.nextInt();

    	if(A[i]<=score && B[i]<=T){
    		score = A[i];
    		scorecount++;
    	}

    	}
    	if(score == 1000 && scorecount == 0){
    		System.out.println("TLE");
    	}else{
    		System.out.println(score);
    	}



    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int score = 1000; score 1000 int scorecount =0; scorecount 0 int N=sc.nextInt(); N sc.nextInt() sc.nextInt sc int T=sc.nextInt(); T sc.nextInt() sc.nextInt sc int A[] = new int[N]; A new int[N] N int B[] = new int[N]; B new int[N] N for(int i = 0;i<N;i++){
    		A[i]= sc.nextInt();
    		B[i]=sc.nextInt();

    	if(A[i]<=score && B[i]<=T){
    		score = A[i];
    		scorecount++;
    	}

    	} int i = 0; int i = 0; i 0 i<N i N i++ i++ i {
    		A[i]= sc.nextInt();
    		B[i]=sc.nextInt();

    	if(A[i]<=score && B[i]<=T){
    		score = A[i];
    		scorecount++;
    	}

    	} {
    		A[i]= sc.nextInt();
    		B[i]=sc.nextInt();

    	if(A[i]<=score && B[i]<=T){
    		score = A[i];
    		scorecount++;
    	}

    	} A[i]= sc.nextInt() A[i] A i sc.nextInt() sc.nextInt sc B[i]=sc.nextInt() B[i] B i sc.nextInt() sc.nextInt sc if(A[i]<=score && B[i]<=T){
    		score = A[i];
    		scorecount++;
    	} A[i]<=score && B[i]<=T A[i]<=score A[i] A i score B[i]<=T B[i] B i T {
    		score = A[i];
    		scorecount++;
    	} score = A[i] score A[i] A i scorecount++ scorecount if(score == 1000 && scorecount == 0){
    		System.out.println("TLE");
    	}else{
    		System.out.println(score);
    	} score == 1000 && scorecount == 0 score == 1000 score 1000 scorecount == 0 scorecount 0 {
    		System.out.println("TLE");
    	} System.out.println("TLE") System.out.println System.out System System.out "TLE" {
    		System.out.println(score);
    	} System.out.println(score) System.out.println System.out System System.out score String[] args args
import java.util.Scanner;



class Main {
    public static void main(String[] args) {
    	Scanner sc = new Scanner(System.in);
    	int score = 1000;
    	int scorecount =0;
    	int N=sc.nextInt();
    	int T=sc.nextInt();
    	int A[] = new int[N];
		int B[] = new int[N];

    	for(int i = 0;i<N;i++){
    		A[i]= sc.nextInt();
    		B[i]=sc.nextInt();

    	if(A[i]<=score && B[i]<=T){
    		score = A[i];
    		scorecount++;
    	}

    	}
    	if(score == 1000 && scorecount == 0){
    		System.out.println("TLE");
    	}else{
    		System.out.println(score);
    	}



    }
}