#include <bits/stdc++.h>
using namespace std;

int main() {
  int n,T,ans = 10000;
  cin >> n >> T;
  for(int i = 0;i < n;i++){
    int c,t;
    cin >> c >> t;
    if(t <= T && c < ans) ans = c;
  }
  if(ans == 10000) cout << "TLE" << endl;
  else cout << ans << endl;
}
