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


public class Main {

	private static Scanner sc;
	private static Printer pr;

	private static void solve() {
		int n = sc.nextInt();
		int T = sc.nextInt();
		
		int[] c = new int[n];
		int[] t = new int[n];
		for (int i = 0; i < n; i++) {
			c[i] = sc.nextInt();
			t[i] = sc.nextInt();
		}
		
		int min = Integer.MAX_VALUE;
		int mini = -1;
		for (int i = 0; i < n; i++) {
			if (t[i] <= T && c[i] < min) {
				min = c[i];
				mini = i;
			}
		}
		
		if (mini == -1) {
			pr.println("TLE");
		} else {
			pr.println(c[mini]);
		}
	}

	// ---------------------------------------------------
	public static void main(String[] args) {
		sc = new Scanner(System.in);
		pr = new Printer(System.out);
			
		solve();
			
		pr.close();
		sc.close();
	}

	static class Printer extends PrintWriter {
		Printer(OutputStream out) {
			super(out);
		}
	}
} import java.io.*; io.* java import java.util.Scanner; Scanner java.util public class Main {

	private static Scanner sc;
	private static Printer pr;

	private static void solve() {
		int n = sc.nextInt();
		int T = sc.nextInt();
		
		int[] c = new int[n];
		int[] t = new int[n];
		for (int i = 0; i < n; i++) {
			c[i] = sc.nextInt();
			t[i] = sc.nextInt();
		}
		
		int min = Integer.MAX_VALUE;
		int mini = -1;
		for (int i = 0; i < n; i++) {
			if (t[i] <= T && c[i] < min) {
				min = c[i];
				mini = i;
			}
		}
		
		if (mini == -1) {
			pr.println("TLE");
		} else {
			pr.println(c[mini]);
		}
	}

	// ---------------------------------------------------
	public static void main(String[] args) {
		sc = new Scanner(System.in);
		pr = new Printer(System.out);
			
		solve();
			
		pr.close();
		sc.close();
	}

	static class Printer extends PrintWriter {
		Printer(OutputStream out) {
			super(out);
		}
	}
} Main private static Scanner sc; sc private static Printer pr; pr private static void solve() {
		int n = sc.nextInt();
		int T = sc.nextInt();
		
		int[] c = new int[n];
		int[] t = new int[n];
		for (int i = 0; i < n; i++) {
			c[i] = sc.nextInt();
			t[i] = sc.nextInt();
		}
		
		int min = Integer.MAX_VALUE;
		int mini = -1;
		for (int i = 0; i < n; i++) {
			if (t[i] <= T && c[i] < min) {
				min = c[i];
				mini = i;
			}
		}
		
		if (mini == -1) {
			pr.println("TLE");
		} else {
			pr.println(c[mini]);
		}
	} solve {
		int n = sc.nextInt();
		int T = sc.nextInt();
		
		int[] c = new int[n];
		int[] t = new int[n];
		for (int i = 0; i < n; i++) {
			c[i] = sc.nextInt();
			t[i] = sc.nextInt();
		}
		
		int min = Integer.MAX_VALUE;
		int mini = -1;
		for (int i = 0; i < n; i++) {
			if (t[i] <= T && c[i] < min) {
				min = c[i];
				mini = i;
			}
		}
		
		if (mini == -1) {
			pr.println("TLE");
		} else {
			pr.println(c[mini]);
		}
	} int n = sc.nextInt(); n sc.nextInt() sc.nextInt sc int T = sc.nextInt(); T sc.nextInt() sc.nextInt sc int[] c = new int[n]; c new int[n] n int[] t = new int[n]; t new int[n] n for (int i = 0; i < n; i++) {
			c[i] = sc.nextInt();
			t[i] = sc.nextInt();
		} int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
			c[i] = sc.nextInt();
			t[i] = sc.nextInt();
		} {
			c[i] = sc.nextInt();
			t[i] = sc.nextInt();
		} c[i] = sc.nextInt() c[i] c i sc.nextInt() sc.nextInt sc t[i] = sc.nextInt() t[i] t i sc.nextInt() sc.nextInt sc int min = Integer.MAX_VALUE; min Integer.MAX_VALUE Integer Integer.MAX_VALUE int mini = -1; mini -1 1 for (int i = 0; i < n; i++) {
			if (t[i] <= T && c[i] < min) {
				min = c[i];
				mini = i;
			}
		} int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
			if (t[i] <= T && c[i] < min) {
				min = c[i];
				mini = i;
			}
		} {
			if (t[i] <= T && c[i] < min) {
				min = c[i];
				mini = i;
			}
		} if (t[i] <= T && c[i] < min) {
				min = c[i];
				mini = i;
			} t[i] <= T && c[i] < min t[i] <= T t[i] t i T c[i] < min c[i] c i min {
				min = c[i];
				mini = i;
			} min = c[i] min c[i] c i mini = i mini i if (mini == -1) {
			pr.println("TLE");
		} else {
			pr.println(c[mini]);
		} mini == -1 mini -1 1 {
			pr.println("TLE");
		} pr.println("TLE") pr.println pr "TLE" {
			pr.println(c[mini]);
		} pr.println(c[mini]) pr.println pr c[mini] c mini // ---------------------------------------------------
	public static void main(String[] args) {
		sc = new Scanner(System.in);
		pr = new Printer(System.out);
			
		solve();
			
		pr.close();
		sc.close();
	} main {
		sc = new Scanner(System.in);
		pr = new Printer(System.out);
			
		solve();
			
		pr.close();
		sc.close();
	} sc = new Scanner(System.in) sc new Scanner(System.in) pr = new Printer(System.out) pr new Printer(System.out) solve() solve pr.close() pr.close pr sc.close() sc.close sc String[] args args static class Printer extends PrintWriter {
		Printer(OutputStream out) {
			super(out);
		}
	} Printer Printer(OutputStream out) {
			super(out);
		} Printer {
			super(out);
		} super(out) super out OutputStream out out PrintWriter public class Main {

	private static Scanner sc;
	private static Printer pr;

	private static void solve() {
		int n = sc.nextInt();
		int T = sc.nextInt();
		
		int[] c = new int[n];
		int[] t = new int[n];
		for (int i = 0; i < n; i++) {
			c[i] = sc.nextInt();
			t[i] = sc.nextInt();
		}
		
		int min = Integer.MAX_VALUE;
		int mini = -1;
		for (int i = 0; i < n; i++) {
			if (t[i] <= T && c[i] < min) {
				min = c[i];
				mini = i;
			}
		}
		
		if (mini == -1) {
			pr.println("TLE");
		} else {
			pr.println(c[mini]);
		}
	}

	// ---------------------------------------------------
	public static void main(String[] args) {
		sc = new Scanner(System.in);
		pr = new Printer(System.out);
			
		solve();
			
		pr.close();
		sc.close();
	}

	static class Printer extends PrintWriter {
		Printer(OutputStream out) {
			super(out);
		}
	}
} public class Main {

	private static Scanner sc;
	private static Printer pr;

	private static void solve() {
		int n = sc.nextInt();
		int T = sc.nextInt();
		
		int[] c = new int[n];
		int[] t = new int[n];
		for (int i = 0; i < n; i++) {
			c[i] = sc.nextInt();
			t[i] = sc.nextInt();
		}
		
		int min = Integer.MAX_VALUE;
		int mini = -1;
		for (int i = 0; i < n; i++) {
			if (t[i] <= T && c[i] < min) {
				min = c[i];
				mini = i;
			}
		}
		
		if (mini == -1) {
			pr.println("TLE");
		} else {
			pr.println(c[mini]);
		}
	}

	// ---------------------------------------------------
	public static void main(String[] args) {
		sc = new Scanner(System.in);
		pr = new Printer(System.out);
			
		solve();
			
		pr.close();
		sc.close();
	}

	static class Printer extends PrintWriter {
		Printer(OutputStream out) {
			super(out);
		}
	}
} Main
import java.io.*;
import java.util.Scanner;


public class Main {

	private static Scanner sc;
	private static Printer pr;

	private static void solve() {
		int n = sc.nextInt();
		int T = sc.nextInt();
		
		int[] c = new int[n];
		int[] t = new int[n];
		for (int i = 0; i < n; i++) {
			c[i] = sc.nextInt();
			t[i] = sc.nextInt();
		}
		
		int min = Integer.MAX_VALUE;
		int mini = -1;
		for (int i = 0; i < n; i++) {
			if (t[i] <= T && c[i] < min) {
				min = c[i];
				mini = i;
			}
		}
		
		if (mini == -1) {
			pr.println("TLE");
		} else {
			pr.println(c[mini]);
		}
	}

	// ---------------------------------------------------
	public static void main(String[] args) {
		sc = new Scanner(System.in);
		pr = new Printer(System.out);
			
		solve();
			
		pr.close();
		sc.close();
	}

	static class Printer extends PrintWriter {
		Printer(OutputStream out) {
			super(out);
		}
	}
}
