S=input() SX=S[:len(S)//2] if S==SX+SX: print("YES") else: print("NO")