import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int limittime = sc.nextInt();
		class Root {
			private int cost;
			private int time;

			public Root(int cost, int time) {
				super();
				this.cost = cost;
				this.time = time;
			}

			public int getCost() {
				return cost;
			}

			public int getTime() {
				return time;
			}
		}

		List<Root> roots = new ArrayList<Root>();
		for (int i = 0; i < n; i++) {
			int c = sc.nextInt();
			int t = sc.nextInt();
			roots.add(new Root(c, t));
		}
		

		int minimamCost = 9999;
		for (int j = 0; j < roots.size(); j++) {
			Root root = roots.get(j);

			if (root.getTime() <= limittime) {
				if (root.getCost() <= minimamCost) {
					minimamCost = root.getCost();
				}
			}
		}

		if (minimamCost == 9999) {
			System.out.println("TLE");
		} else {
			System.out.println(minimamCost);
		}

	}
} import java.util.ArrayList; ArrayList java.util import java.util.List; List java.util import java.util.Scanner; Scanner java.util public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int limittime = sc.nextInt();
		class Root {
			private int cost;
			private int time;

			public Root(int cost, int time) {
				super();
				this.cost = cost;
				this.time = time;
			}

			public int getCost() {
				return cost;
			}

			public int getTime() {
				return time;
			}
		}

		List<Root> roots = new ArrayList<Root>();
		for (int i = 0; i < n; i++) {
			int c = sc.nextInt();
			int t = sc.nextInt();
			roots.add(new Root(c, t));
		}
		

		int minimamCost = 9999;
		for (int j = 0; j < roots.size(); j++) {
			Root root = roots.get(j);

			if (root.getTime() <= limittime) {
				if (root.getCost() <= minimamCost) {
					minimamCost = root.getCost();
				}
			}
		}

		if (minimamCost == 9999) {
			System.out.println("TLE");
		} else {
			System.out.println(minimamCost);
		}

	}
} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int limittime = sc.nextInt();
		class Root {
			private int cost;
			private int time;

			public Root(int cost, int time) {
				super();
				this.cost = cost;
				this.time = time;
			}

			public int getCost() {
				return cost;
			}

			public int getTime() {
				return time;
			}
		}

		List<Root> roots = new ArrayList<Root>();
		for (int i = 0; i < n; i++) {
			int c = sc.nextInt();
			int t = sc.nextInt();
			roots.add(new Root(c, t));
		}
		

		int minimamCost = 9999;
		for (int j = 0; j < roots.size(); j++) {
			Root root = roots.get(j);

			if (root.getTime() <= limittime) {
				if (root.getCost() <= minimamCost) {
					minimamCost = root.getCost();
				}
			}
		}

		if (minimamCost == 9999) {
			System.out.println("TLE");
		} else {
			System.out.println(minimamCost);
		}

	} main {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int limittime = sc.nextInt();
		class Root {
			private int cost;
			private int time;

			public Root(int cost, int time) {
				super();
				this.cost = cost;
				this.time = time;
			}

			public int getCost() {
				return cost;
			}

			public int getTime() {
				return time;
			}
		}

		List<Root> roots = new ArrayList<Root>();
		for (int i = 0; i < n; i++) {
			int c = sc.nextInt();
			int t = sc.nextInt();
			roots.add(new Root(c, t));
		}
		

		int minimamCost = 9999;
		for (int j = 0; j < roots.size(); j++) {
			Root root = roots.get(j);

			if (root.getTime() <= limittime) {
				if (root.getCost() <= minimamCost) {
					minimamCost = root.getCost();
				}
			}
		}

		if (minimamCost == 9999) {
			System.out.println("TLE");
		} else {
			System.out.println(minimamCost);
		}

	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int n = sc.nextInt(); n sc.nextInt() sc.nextInt sc int limittime = sc.nextInt(); limittime sc.nextInt() sc.nextInt sc List<Root> roots = new ArrayList<Root>(); roots new ArrayList<Root>() for (int i = 0; i < n; i++) {
			int c = sc.nextInt();
			int t = sc.nextInt();
			roots.add(new Root(c, t));
		} int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
			int c = sc.nextInt();
			int t = sc.nextInt();
			roots.add(new Root(c, t));
		} {
			int c = sc.nextInt();
			int t = sc.nextInt();
			roots.add(new Root(c, t));
		} int c = sc.nextInt(); c sc.nextInt() sc.nextInt sc int t = sc.nextInt(); t sc.nextInt() sc.nextInt sc roots.add(new Root(c, t)) roots.add roots new Root(c, t) int minimamCost = 9999; minimamCost 9999 for (int j = 0; j < roots.size(); j++) {
			Root root = roots.get(j);

			if (root.getTime() <= limittime) {
				if (root.getCost() <= minimamCost) {
					minimamCost = root.getCost();
				}
			}
		} int j = 0; int j = 0; j 0 j < roots.size() j roots.size() roots.size roots j++ j++ j {
			Root root = roots.get(j);

			if (root.getTime() <= limittime) {
				if (root.getCost() <= minimamCost) {
					minimamCost = root.getCost();
				}
			}
		} {
			Root root = roots.get(j);

			if (root.getTime() <= limittime) {
				if (root.getCost() <= minimamCost) {
					minimamCost = root.getCost();
				}
			}
		} Root root = roots.get(j); root roots.get(j) roots.get roots j if (root.getTime() <= limittime) {
				if (root.getCost() <= minimamCost) {
					minimamCost = root.getCost();
				}
			} root.getTime() <= limittime root.getTime() root.getTime root limittime {
				if (root.getCost() <= minimamCost) {
					minimamCost = root.getCost();
				}
			} if (root.getCost() <= minimamCost) {
					minimamCost = root.getCost();
				} root.getCost() <= minimamCost root.getCost() root.getCost root minimamCost {
					minimamCost = root.getCost();
				} minimamCost = root.getCost() minimamCost root.getCost() root.getCost root if (minimamCost == 9999) {
			System.out.println("TLE");
		} else {
			System.out.println(minimamCost);
		} minimamCost == 9999 minimamCost 9999 {
			System.out.println("TLE");
		} System.out.println("TLE") System.out.println System.out System System.out "TLE" {
			System.out.println(minimamCost);
		} System.out.println(minimamCost) System.out.println System.out System System.out minimamCost String[] args args public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int limittime = sc.nextInt();
		class Root {
			private int cost;
			private int time;

			public Root(int cost, int time) {
				super();
				this.cost = cost;
				this.time = time;
			}

			public int getCost() {
				return cost;
			}

			public int getTime() {
				return time;
			}
		}

		List<Root> roots = new ArrayList<Root>();
		for (int i = 0; i < n; i++) {
			int c = sc.nextInt();
			int t = sc.nextInt();
			roots.add(new Root(c, t));
		}
		

		int minimamCost = 9999;
		for (int j = 0; j < roots.size(); j++) {
			Root root = roots.get(j);

			if (root.getTime() <= limittime) {
				if (root.getCost() <= minimamCost) {
					minimamCost = root.getCost();
				}
			}
		}

		if (minimamCost == 9999) {
			System.out.println("TLE");
		} else {
			System.out.println(minimamCost);
		}

	}
} public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int limittime = sc.nextInt();
		class Root {
			private int cost;
			private int time;

			public Root(int cost, int time) {
				super();
				this.cost = cost;
				this.time = time;
			}

			public int getCost() {
				return cost;
			}

			public int getTime() {
				return time;
			}
		}

		List<Root> roots = new ArrayList<Root>();
		for (int i = 0; i < n; i++) {
			int c = sc.nextInt();
			int t = sc.nextInt();
			roots.add(new Root(c, t));
		}
		

		int minimamCost = 9999;
		for (int j = 0; j < roots.size(); j++) {
			Root root = roots.get(j);

			if (root.getTime() <= limittime) {
				if (root.getCost() <= minimamCost) {
					minimamCost = root.getCost();
				}
			}
		}

		if (minimamCost == 9999) {
			System.out.println("TLE");
		} else {
			System.out.println(minimamCost);
		}

	}
} Main
import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int limittime = sc.nextInt();
		class Root {
			private int cost;
			private int time;

			public Root(int cost, int time) {
				super();
				this.cost = cost;
				this.time = time;
			}

			public int getCost() {
				return cost;
			}

			public int getTime() {
				return time;
			}
		}

		List<Root> roots = new ArrayList<Root>();
		for (int i = 0; i < n; i++) {
			int c = sc.nextInt();
			int t = sc.nextInt();
			roots.add(new Root(c, t));
		}
		

		int minimamCost = 9999;
		for (int j = 0; j < roots.size(); j++) {
			Root root = roots.get(j);

			if (root.getTime() <= limittime) {
				if (root.getCost() <= minimamCost) {
					minimamCost = root.getCost();
				}
			}
		}

		if (minimamCost == 9999) {
			System.out.println("TLE");
		} else {
			System.out.println(minimamCost);
		}

	}
}
