#include<bits/stdc++.h>
using namespace std;
int main()
{
    int n,t,ci,ti,ans=1e9;
    scanf("%d%d",&n,&t);
    while(n--)
    {
        scanf("%d%d",&ci,&ti);
        if(ti<=t) ans=min(ans,ci);
    }
    if(ans==1e9) printf("TLE\n");
    else printf("%d\n",ans);

}
