n = int(input())

s = input()



if n % 2 == 1:

    print('No')

    exit()



l = int(n/2)

print('Yes') if s[:l] == s[l:] else print('No')

n = int(input())

s = input()

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

n = int(input())
s = input()
if n % 2 == 1:
    print("No")
    exit()
l = int(n / 2)
print("Yes") if s[:l] == s[l:] else print("No")

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

-if n % 2 == 1: -    print("No") -    exit() -l = int(n / 2) -print("Yes") if s[:l] == s[l:] else print("No") +print("Yes") if s[: n // 2] == s[n // 2 :] else print("No")