import Control.Monad

check :: String -> [String] -> String
check _ []   = "Yes"
check w (x:xs) = if (w == x) then "No"
                           else check w xs

checks :: Int -> [String] -> IO String
checks 0 _ = return "Yes"
checks n s = do
  w <- getLine
  if (check w s == "No") then return "No"
    else checks (n-1) (w:s)

main :: IO ()
main = do
  n <- read <$> getLine :: IO Int
  join $ putStrLn <$> checks n []
