n=int(eval(input()));s=eval(input());print(('No' if n%2!=0 or s[:n//2]!=s[n//2:] else 'Yes')) 
n=int(eval(input()));s=eval(input());print(('No'if s[:n//2]!=s[n//2:] else'Yes'))
n = int(eval(input()))
s = eval(input())
print(("No" if n % 2 != 0 or s[: n // 2] != s[n // 2 :] else "Yes"))

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

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