n = int(eval(input()))

s = eval(input())





if s[:(n//2)] == s[(n//2):]:

    print('Yes')

else:

    print('No')
n = int(eval(input()))

s = eval(input())

t = ""

for i in range(n // 2):

    t += s[i]

    

if s == (t + t):

    print('Yes')

else:

    print('No')
n = int(eval(input()))
s = eval(input())
if s[: (n // 2)] == s[(n // 2) :]:
    print("Yes")
else:
    print("No")

n = int(eval(input()))
s = eval(input())
t = ""
for i in range(n // 2):
    t += s[i]
if s == (t + t):
    print("Yes")
else:
    print("No")

-if s[: (n // 2)] == s[(n // 2) :]: +t = "" +for i in range(n // 2): +    t += s[i] +if s == (t + t):