n = int(eval(input()))

s = eval(input())



if n % 2 == 0 and s[:n//2] == s[n//2:]:

  print('Yes')

else:

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

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

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