import Control.Monad
import Data.Maybe
import qualified Data.ByteString.Char8 as BS

readInt = fst . fromJust . BS.readInt
getInt = readInt <$> BS.getLine

main = do
    n <- getInt
    s <- getLine
    if solve n s then putStrLn "Yes" else putStrLn "No"

solve n s = take n' s == drop n' s
    where n' = n `div` 2