(defun has-duplicate-char (s) (let ((char-set (make-hash-table :test 'equal))) (loop for char across s do (if (gethash char char-set) (return-from has-duplicate-char t) (setf (gethash char char-set) t))) nil)) (defun main () (let ((n (read)) (s (read-line))) (declare (ignore n)) (if (has-duplicate-char s) (format t "Yes~%") (format t "No~%")))) (main)