n = int(eval(input()))

s = eval(input())





def judge(s):

    if len(s) % 2 == 1:

        print("No")

        return

    for i in range(0, len(s)//2):

        if(s[i] != s[len(s)//2 + i]):

            print("No")

            return

    print("Yes")

    return





judge(s)
n = int(eval(input()))

s = eval(input())



l = s[:len(s)//2]

if s == l+l:

    print("Yes")

else: print("No")
n = int(eval(input()))
s = eval(input())


def judge(s):
    if len(s) % 2 == 1:
        print("No")
        return
    for i in range(0, len(s) // 2):
        if s[i] != s[len(s) // 2 + i]:
            print("No")
            return
    print("Yes")
    return


judge(s)

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

- - -def judge(s): -    if len(s) % 2 == 1: -        print("No") -        return -    for i in range(0, len(s) // 2): -        if s[i] != s[len(s) // 2 + i]: -            print("No") -            return +l = s[: len(s) // 2] +if s == l + l: -    return - - -judge(s) +else: +    print("No")