(function (input) {
  'use strict';
  const lines = input.split('\n')
  const tle = Number(lines[0].split(' ')[1])
  const Length = Number(lines[0].split(' ')[0])
  let costMix = 2000
  for(let i=1; i<Length+1; i++){
    let cost = Number(lines[i].split(' ')[0])
    let time = Number(lines[i].split(' ')[1])
    if (time > tle) continue
    if (cost < costMix) costMix = cost
  }
  if (costMix === 2000) console.log('TLE')
  else console.log(costMix)
})(require("fs").readFileSync("/dev/stdin", 'utf8'));
