solve :: Int -> String -> String
solve n inStr
 | odd n = "No"
 | take (div n 2) inStr == drop (div n 2) inStr = "Yes" 
 | otherwise = "No"
main = do
 n <- read <$> getLine :: IO Int
 putStr =<< (solve n) <$> getLine