input_line = input() words = list(input_line) if len(words) % 2 == 1: print('NO') else: word1 = [] word2 = [] for n in range(len(words)/2 + 1): word1.append(words[n-1]) for n in range(len(words)/2 + 1): word2.append(words[n + (len(words)/2) - 1]) if word1 == word2: print('YES') else: print('NO')