S = input().strip() unique_letters = set(c for c in S if c != ' ') found = False # Precompute all possible subsets of unique letters using bitmask from itertools import chain, combinations def all_subsets(s): return chain.from_iterable(combinations(s, r) for r in range(len(s)+1)) for subset in all_subsets(unique_letters): R = set(subset) transformed = [] for c in S: if c == ' ': transformed.append(' ') elif c in R: transformed.append(c) else: transformed.append(' ') # Trim leading and trailing spaces s = ''.join(transformed).strip() if len(s) < 2: continue # Check all even positions (1-based) are spaces and odd are letters valid = True for i in range(len(s)): if (i+1) % 2 == 1: # odd positions must be letters if s[i] == ' ': valid = False break else: # even positions must be spaces if s[i] != ' ': valid = False break if valid: found = True break print("Yes" if found else "NO")