N = int(eval(input()))

S = eval(input())

if N % 2 == 1 or S[:N // 2] != S[N // 2:]:

    print("No")

else:

    print("Yes")

N = int(eval(input()))

S = eval(input())

print(("Yes" if S[:N // 2] == S[N // 2:] else "No"))

N = int(eval(input()))
S = eval(input())
if N % 2 == 1 or S[: N // 2] != S[N // 2 :]:
    print("No")
else:
    print("Yes")

N = int(eval(input()))
S = eval(input())
print(("Yes" if S[: N // 2] == S[N // 2 :] else "No"))

-if N % 2 == 1 or S[: N // 2] != S[N // 2 :]: -    print("No") -else: -    print("Yes") +print(("Yes" if S[: N // 2] == S[N // 2 :] else "No"))