
import java.util.Arrays;
import java.util.Scanner;

public class Main {
	public static void main(String[] args) {

		Scanner scan = new Scanner(System.in);
		int n = scan.nextInt();
		int targetTime = scan.nextInt();
		
		int ans = Integer.MAX_VALUE;
		int[][] costTime = new int[n][2];
		for (int i = 0; i < costTime.length; i++) {
			for (int j = 0; j < 2; j++) {
				costTime[i][j] = scan.nextInt();
			}
		}
		
		for (int i = 0; i < costTime.length; i++) {
			if (!(costTime[i][1] <= targetTime)) {
				continue;
			}
			
			if(ans > costTime[i][0]) {
				ans = costTime[i][0];
			}
		}
		
		if (ans == Integer.MAX_VALUE) {
			System.out.println("TLE");
		} else {
			
			System.out.println(ans);
		}
		
	}
} import java.util.Arrays; Arrays java.util import java.util.Scanner; Scanner java.util public class Main {
	public static void main(String[] args) {

		Scanner scan = new Scanner(System.in);
		int n = scan.nextInt();
		int targetTime = scan.nextInt();
		
		int ans = Integer.MAX_VALUE;
		int[][] costTime = new int[n][2];
		for (int i = 0; i < costTime.length; i++) {
			for (int j = 0; j < 2; j++) {
				costTime[i][j] = scan.nextInt();
			}
		}
		
		for (int i = 0; i < costTime.length; i++) {
			if (!(costTime[i][1] <= targetTime)) {
				continue;
			}
			
			if(ans > costTime[i][0]) {
				ans = costTime[i][0];
			}
		}
		
		if (ans == Integer.MAX_VALUE) {
			System.out.println("TLE");
		} else {
			
			System.out.println(ans);
		}
		
	}
} Main public static void main(String[] args) {

		Scanner scan = new Scanner(System.in);
		int n = scan.nextInt();
		int targetTime = scan.nextInt();
		
		int ans = Integer.MAX_VALUE;
		int[][] costTime = new int[n][2];
		for (int i = 0; i < costTime.length; i++) {
			for (int j = 0; j < 2; j++) {
				costTime[i][j] = scan.nextInt();
			}
		}
		
		for (int i = 0; i < costTime.length; i++) {
			if (!(costTime[i][1] <= targetTime)) {
				continue;
			}
			
			if(ans > costTime[i][0]) {
				ans = costTime[i][0];
			}
		}
		
		if (ans == Integer.MAX_VALUE) {
			System.out.println("TLE");
		} else {
			
			System.out.println(ans);
		}
		
	} main {

		Scanner scan = new Scanner(System.in);
		int n = scan.nextInt();
		int targetTime = scan.nextInt();
		
		int ans = Integer.MAX_VALUE;
		int[][] costTime = new int[n][2];
		for (int i = 0; i < costTime.length; i++) {
			for (int j = 0; j < 2; j++) {
				costTime[i][j] = scan.nextInt();
			}
		}
		
		for (int i = 0; i < costTime.length; i++) {
			if (!(costTime[i][1] <= targetTime)) {
				continue;
			}
			
			if(ans > costTime[i][0]) {
				ans = costTime[i][0];
			}
		}
		
		if (ans == Integer.MAX_VALUE) {
			System.out.println("TLE");
		} else {
			
			System.out.println(ans);
		}
		
	} Scanner scan = new Scanner(System.in); scan new Scanner(System.in) int n = scan.nextInt(); n scan.nextInt() scan.nextInt scan int targetTime = scan.nextInt(); targetTime scan.nextInt() scan.nextInt scan int ans = Integer.MAX_VALUE; ans Integer.MAX_VALUE Integer Integer.MAX_VALUE int[][] costTime = new int[n][2]; costTime new int[n][2] n 2 for (int i = 0; i < costTime.length; i++) {
			for (int j = 0; j < 2; j++) {
				costTime[i][j] = scan.nextInt();
			}
		} int i = 0; int i = 0; i 0 i < costTime.length i costTime.length costTime costTime.length i++ i++ i {
			for (int j = 0; j < 2; j++) {
				costTime[i][j] = scan.nextInt();
			}
		} {
			for (int j = 0; j < 2; j++) {
				costTime[i][j] = scan.nextInt();
			}
		} for (int j = 0; j < 2; j++) {
				costTime[i][j] = scan.nextInt();
			} int j = 0; int j = 0; j 0 j < 2 j 2 j++ j++ j {
				costTime[i][j] = scan.nextInt();
			} {
				costTime[i][j] = scan.nextInt();
			} costTime[i][j] = scan.nextInt() costTime[i][j] costTime[i] costTime i j scan.nextInt() scan.nextInt scan for (int i = 0; i < costTime.length; i++) {
			if (!(costTime[i][1] <= targetTime)) {
				continue;
			}
			
			if(ans > costTime[i][0]) {
				ans = costTime[i][0];
			}
		} int i = 0; int i = 0; i 0 i < costTime.length i costTime.length costTime costTime.length i++ i++ i {
			if (!(costTime[i][1] <= targetTime)) {
				continue;
			}
			
			if(ans > costTime[i][0]) {
				ans = costTime[i][0];
			}
		} {
			if (!(costTime[i][1] <= targetTime)) {
				continue;
			}
			
			if(ans > costTime[i][0]) {
				ans = costTime[i][0];
			}
		} if (!(costTime[i][1] <= targetTime)) {
				continue;
			} !(costTime[i][1] <= targetTime) (costTime[i][1] <= targetTime) costTime[i][1] costTime[i] costTime i 1 targetTime {
				continue;
			} continue; if(ans > costTime[i][0]) {
				ans = costTime[i][0];
			} ans > costTime[i][0] ans costTime[i][0] costTime[i] costTime i 0 {
				ans = costTime[i][0];
			} ans = costTime[i][0] ans costTime[i][0] costTime[i] costTime i 0 if (ans == Integer.MAX_VALUE) {
			System.out.println("TLE");
		} else {
			
			System.out.println(ans);
		} ans == Integer.MAX_VALUE ans Integer.MAX_VALUE Integer Integer.MAX_VALUE {
			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) {

		Scanner scan = new Scanner(System.in);
		int n = scan.nextInt();
		int targetTime = scan.nextInt();
		
		int ans = Integer.MAX_VALUE;
		int[][] costTime = new int[n][2];
		for (int i = 0; i < costTime.length; i++) {
			for (int j = 0; j < 2; j++) {
				costTime[i][j] = scan.nextInt();
			}
		}
		
		for (int i = 0; i < costTime.length; i++) {
			if (!(costTime[i][1] <= targetTime)) {
				continue;
			}
			
			if(ans > costTime[i][0]) {
				ans = costTime[i][0];
			}
		}
		
		if (ans == Integer.MAX_VALUE) {
			System.out.println("TLE");
		} else {
			
			System.out.println(ans);
		}
		
	}
} public class Main {
	public static void main(String[] args) {

		Scanner scan = new Scanner(System.in);
		int n = scan.nextInt();
		int targetTime = scan.nextInt();
		
		int ans = Integer.MAX_VALUE;
		int[][] costTime = new int[n][2];
		for (int i = 0; i < costTime.length; i++) {
			for (int j = 0; j < 2; j++) {
				costTime[i][j] = scan.nextInt();
			}
		}
		
		for (int i = 0; i < costTime.length; i++) {
			if (!(costTime[i][1] <= targetTime)) {
				continue;
			}
			
			if(ans > costTime[i][0]) {
				ans = costTime[i][0];
			}
		}
		
		if (ans == Integer.MAX_VALUE) {
			System.out.println("TLE");
		} else {
			
			System.out.println(ans);
		}
		
	}
} Main

import java.util.Arrays;
import java.util.Scanner;

public class Main {
	public static void main(String[] args) {

		Scanner scan = new Scanner(System.in);
		int n = scan.nextInt();
		int targetTime = scan.nextInt();
		
		int ans = Integer.MAX_VALUE;
		int[][] costTime = new int[n][2];
		for (int i = 0; i < costTime.length; i++) {
			for (int j = 0; j < 2; j++) {
				costTime[i][j] = scan.nextInt();
			}
		}
		
		for (int i = 0; i < costTime.length; i++) {
			if (!(costTime[i][1] <= targetTime)) {
				continue;
			}
			
			if(ans > costTime[i][0]) {
				ans = costTime[i][0];
			}
		}
		
		if (ans == Integer.MAX_VALUE) {
			System.out.println("TLE");
		} else {
			
			System.out.println(ans);
		}
		
	}
}