import sys sys.setrecursionlimit(2147483647) INF=float("inf") MOD=10**9+7 # 998244353 input=lambda:sys.stdin.readline().rstrip() def resolve(): S = input() if not S: print("No") return count = [set() for _ in range(26)] for i, s in enumerate(S): if s == ' ': continue s = ord(s) - ord('a') count[s].add(i%2) print("Yes" if any(len(count[i])==1 for i in range(26)) else "NO") resolve()