N = gets.to_i
str = gets.split("")

before = []
index1 = 0
index2 = 0

ans = 0

if N%2 == 1
    puts 'No'
else
    (N/2).times do
        before.push(str[index1])
        index1 += 1
    end
    
    (N/2).times do
        if before[index2] == str[index1]
            ans += 1
            index1 += 1
            index2 += 1
        else
            index1 += 1
            index2 += 1
        end
    end
    
    if ans == N/2
        puts 'Yes'
    else
        puts 'No'
    end
end
