n = int(eval(input()))

s = str(eval(input()))

t = int(n/2)



s_1half = s[:t]

s_2half = s[t:]



if n % 2 == 1:

    print("No")

elif s_1half == s_2half:

    print("Yes")

elif s_1half != s_2half:

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

s = str(eval(input()))

t = int(n/2)



if n % 2 == 1:

    print("No")

else:

    for i in range(t):

        if s[i] == s[i+t]:

            continue

        else:

            print("No")

            exit()

    print("Yes")
n = int(eval(input()))
s = str(eval(input()))
t = int(n / 2)
s_1half = s[:t]
s_2half = s[t:]
if n % 2 == 1:
    print("No")
elif s_1half == s_2half:
    print("Yes")
elif s_1half != s_2half:
    print("No")

n = int(eval(input()))
s = str(eval(input()))
t = int(n / 2)
if n % 2 == 1:
    print("No")
else:
    for i in range(t):
        if s[i] == s[i + t]:
            continue
        else:
            print("No")
            exit()
    print("Yes")

-s_1half = s[:t] -s_2half = s[t:] -elif s_1half == s_2half: +else: +    for i in range(t): +        if s[i] == s[i + t]: +            continue +        else: +            print("No") +            exit() -elif s_1half != s_2half: -    print("No")