import sys read = sys.stdin.buffer.read readline = sys.stdin.buffer.readline readlines = sys.stdin.buffer.readlines S=input().strip() A=[set() for i in range(26)] for i in range(len(S)): if 0<=ord(S[i])-97<26: A[ord(S[i])-97].add(i%2) if len(S)<=1: print("NO") sys.exit() for a in A: if len(a)==1: print("Yes") break else: print("NO")