s=input() n=len(s) for i in range(n): if ord(s[i])>=ord("a") and ord(s[i])<=ord("z"): continue if s[i]==' ' or s[i]==' ': continue assert False exit() if n==1: print("NO") exit() ok=0 for i in range(n-1): for j in range(i, n): if (j-i)%2==1: continue b=0 dame=0 for k in range(i, j+1): if (k-i)%2==0: if s[k]==' ': dame=1 break b|=(1<<(ord(s[k])-ord("a"))) if dame==1: continue for k in range(n): if (k-i)%2==0 and k>=i and k<=j: continue if s[k]==' ': continue if b&(1<<(ord(s[k])-ord("a"))): dame=1 break if dame==0: ok=1 if ok: print("Yes") else: print("NO")