Scanf.scanf "%s" (fun s -> let h = Array.make 26 0 in String.iter (fun c -> let q = int_of_char c - 65 in h.(q) <- h.(q) + 1) s; print_endline @@ if Array.fold_left (fun acc v -> if v > 1 then true else acc) false h then "NO" else "YES" )