#define LOCAL


#include<algorithm>
#include<iostream>
#include<iomanip>
#include<numeric>
#include<valarray>
#include<vector>
#include<map>
#include<list>
#include<bitset>
#include<stdio.h>
#include<sstream>
#include<string>
#include<functional>
#include<utility>
using namespace std;
template<class iterator_t>
class range
{
	iterator_t _first, _last;
public:
	range(iterator_t first, iterator_t last) :_first(first), _last(last) {}
	iterator_t begin() { return _first; }
	iterator_t end() { return _last; }
	reverse_iterator<iterator_t> rbegin() { return std::make_reverse_iterator(_last); }
	reverse_iterator<iterator_t> rend() { return std::make_reverse_iterator(_first); }
	size_t size() { return std::distance(_first, _last); }
};
template<class T>T begin(range<T> _range) { return _range.begin(); }
template<class T>T end(range<T> _range) { return _range.end(); }
template<class T>T rbegin(range<T> _range) { return _range.rbegin(); }
template<class T>T rend(range<T> _range) { return _range.rend(); }
string to_string(bool _Val) { return (_Val) ? "true" : "false"; }
struct start { start() { cin.tie(0); ios::sync_with_stdio(0); cout << fixed << setprecision(10); }; }start;
inline long read() {
	long x = 0, f = 1; char ch = getchar();
	while (ch<'0' || ch>'9') { if (ch == '-') f = -1; ch = getchar(); }
	while (ch >= '0'&&ch <= '9') { x = 10 * x + ch - '0'; ch = getchar(); }
	return x * f;
}
inline string readline() { string str; char c; while ((c = getchar()) != '\n')	str += c; return str; }
inline string readtoken() { string str; char c;	while ((c = getchar()) != ' ')str += c; return str; }
inline void write(long x) { cout << x; }
inline void writeline(long x) { cout << x << endl; }
inline void writeline(string x) { cout << x << endl; }
inline void writetoken(string x) { cout << x; }
template<class T = intmax_t>T GCD(T x, T y) { return x % y ? GCD<T>(y, x%y) : y; }
template<class T = intmax_t>T LCM(T x, T y) { return x * y / GCD<T>(x, y); }
constexpr int operator"" _i(long double x) { return (int)x; }
template<class T>inline T max(numeric_limits<T>) { return numeric_limits<T>::max(); }
template<class T>inline T min(numeric_limits<T>) { return numeric_limits<T>::min(); }
inline double root(double x, double index) { return pow(x, 1. / index); }
inline int digitsum(int x) { int ans = 0; while (x) { ans += x % 10; x /= 10; } return ans; }
template<class T>void chmax(T& maxvalue, T temp) { maxvalue = max(maxvalue, temp); }
template<class T>void chmin(T& minvalue, T temp) { minvalue = min(minvalue, temp); }
using uint = unsigned;
template<class T = int>using vec = vector<T>;
template<class T = int>using val = valarray<T>;
using ll = long long;
using llu = long long unsigned;
using i_i = pair<int, int>;
template<class T>using lim = numeric_limits<T>;
#define all(x) begin(x),end(x)
#define rall(x) rbegin(x),rend(x)
#define allrange(x) range(all(x))
#define rep_(n) for(int i##n =0;i##n <n;++i##n)
#define rep(i, n) for(int i = 0; i < n; ++i)
#define reps(i,n) for(int i=1;i<=n;++i)
#define rrep(i,n) for(int i=n-1;i>=0;--i)
#define rreps(i,n) for(int i=n;i>0;--i)
#define each(i,ary) for(auto&& i:ary)
#define loop(i,l,r) for(int i=(l);i<r;++i)
#define ary_sum(ary) accumulate(all(ary),0)
#define ary_max(ary) (*max_element(all(ary)))
#define ary_min(ary) (*min_element(all(ary)))
#define ERASE(ary,target) ary.erase(remove(all(ary), target), end(ary))
#define UNIQUE(ary) ary.erase(unique(all(ary)), end(ary) )
#ifdef LOCAL
#define dump(items) for(auto&& item:items){cout<<item<<endl;}
#define dumps(...) for(auto&& item:{__VA_ARGS__}){cout<<item<<endl;}
#else
#define dump(...)
#define dumps(...)
#endif

int main()
{
	int N = read(), T = read();
	int min = 1e9;
	for (int i = 0; i < N; ++i)
	{
		int c = read(), t = read();
		if (t<=T&&min>c)
			min = c;
	}
	if (min == 1e9)writeline("TLE");
	else writeline(min);
	return 0;
}


Measured memory_bytes: 256