open System
let readNumPair () =
  let str = stdin.ReadLine ()
  let ints =
    str.Split [|' '|]
    |> Array.map (System.Int32.TryParse >> snd)
  ints.[0], ints.[1]

type Path = {
  id: int;
  cost: int;
  time: int;
}

let getPath id =
  let cost, time = readNumPair ()
  {id = id; cost = cost; time = time}

let pathAmt, timeLimit = readNumPair ()

let ans =
  let filtered =
    List.map getPath [1..pathAmt]
    |> List.filter (fun path -> path.time <= timeLimit)
  match filtered with
  | [] -> None
  | l -> List.minBy (fun path -> path.cost) l |> Some

match ans with
| None -> printfn "TLE"
| Some path -> printfn "%d" path.cost