judge n s
	| n `mod` 2 /= 0 = False
	| otherwise = judge' (n `div` 2) s

judge' n s = s1 == s2
	where
		s1 = take n s
		s2 = drop n s

main :: IO ()
main = do
	n <- readLn
	s <- take n <$> getLine
	putStrLn $ if judge n s then "Yes" else "No"
