n = gets.chomp.to_i
s = gets.chomp.split("")
half=s.length/2

fir = []
answer = true
s.each_with_index do |word, i|
  if i < half
    fir << word
  else
    if fir[i-half] != word
      answer = false
      break
    else
    end
  end
end
if answer
  puts "Yes"

else
  puts "No"
end
