s = input() s1 = s[:len(s)] s2 = s[len(s)+1:] print('YES' if s1==s2 else 'NO')