Scanf.scanf "%d %d" @@ fun n t ->
Array.init n (fun _ -> Scanf.scanf " %d %d" (fun x y -> if y <= t then Some x else None))
|> Array.fold_left (fun x y ->
  match x, y with
  | None, _ -> y
  | Some i, Some j when i > j -> Some j
  | _, _ -> x) None
|> function
  | None -> print_endline "TLE"
  | Some i -> Printf.printf "%d\n" i