S=input() ans=[] for i in range(len(S)//2): ans.append(S[i]) ans="".join(ans) print("YES" if S.count(ans)==2 and len(S)%2==0 else "NO")