s = gets.chomp puts (t = s.size).even? && s[0..t/2-1] == s[t/2..-1] ? "YES" : "NO"