N=int(eval(input()))

S=eval(input())

print(("Yes" if N%2==0 and S[:N//2]==S[N//2:] else "No"))
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())
print(("Yes" if N % 2 == 0 and S[: N // 2] == S[N // 2 :] else "No"))

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

-print(("Yes" if N % 2 == 0 and S[: N // 2] == S[N // 2 :] else "No")) +print(("Yes" if S[: N // 2] == S[N // 2 :] else "No"))