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