main :: IO()
main = do
    n <- readLn
    let list = scan [] n {-←getLineの繰り返しの関数にしたい-}
    loop n list
    if loop == False then "No" else "Yes"
    {-↑しりとりかどうかまだ試してないからそこも後で書こうね-}

scan :: IO String -> a -> String
scan list n = do
    w <- getLine{-ここで怒られてるけどわからない・・・；；-}
    w ++ (scan list n-1)

loop :: [a] -> Bool
loop (x:xs) = elemm x xs

elemm :: (Eq a) => a -> [a] -> Bool
elemm a [] = False
elemm a (x:xs)
    | ( x == a ) = True
    | otherwise = a 'elemm' xs