import itertools

import math



N = int(input());

S = input().strip()



def good(s):

    if len(s) % 2 == 1:

        return False

    

    n = len(s) / 2

    return all(s[i] == s[i+n] for i in range(n))



print("Yes" if good(S) else "No")

n = int(input())

if n % 2 > 0:

  print("No")

else:

  s = input().strip()

  h = n/2

  print("Yes" if s[:h] == s[h:] else "No")
import itertools
import math

N = int(input())
S = input().strip()


def good(s):
    if len(s) % 2 == 1:
        return False
    n = len(s) / 2
    return all(s[i] == s[i + n] for i in range(n))


print("Yes" if good(S) else "No")

n = int(input())
if n % 2 > 0:
    print("No")
else:
    s = input().strip()
    h = n / 2
    print("Yes" if s[:h] == s[h:] else "No")

-import itertools -import math - -N = int(input()) -S = input().strip() - - -def good(s): -    if len(s) % 2 == 1: -        return False -    n = len(s) / 2 -    return all(s[i] == s[i + n] for i in range(n)) - - -print("Yes" if good(S) else "No") +n = int(input()) +if n % 2 > 0: +    print("No") +else: +    s = input().strip() +    h = n / 2 +    print("Yes" if s[:h] == s[h:] else "No")