{-# LANGUAGE OverloadedStrings #-}

import           Data.Bool
import qualified Data.ByteString.Char8 as B

main :: IO ()
main = uncurry solve <$> getParams >>= B.putStrLn

getParams :: IO (Int, B.ByteString)
getParams = (,) <$> readLn <*> B.getLine

solve :: Int -> B.ByteString -> B.ByteString
solve n s = bool "No" "Yes" $ x == y
  where (x, y) = B.splitAt center s
        center = n `div` 2
