s = raw_input() len_ = len(s) if len_ % 2 and s[:len_/2]==s[len_/2+1:]: print("YES") else: print("NO")