n = int(eval(input()))

s = eval(input())



if n % 2 == 1:

    print('No')

    exit(0)



n = n // 2

a = s[:n]

if s.count(a) == 2:

    print('Yes')

else:

    print('No')
n = int(eval(input()))

s = eval(input())

a = s[:n//2]

b = s[n//2:]

if a == b:

    print('Yes')

else:

    print('No')
n = int(eval(input()))
s = eval(input())
if n % 2 == 1:
    print("No")
    exit(0)
n = n // 2
a = s[:n]
if s.count(a) == 2:
    print("Yes")
else:
    print("No")

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

-if n % 2 == 1: -    print("No") -    exit(0) -n = n // 2 -a = s[:n] -if s.count(a) == 2: +a = s[: n // 2] +b = s[n // 2 :] +if a == b: