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"))