s=input() #print(s) if set(s[1::2])=={" "} and s[::2] not in " ": print("Yes") else: print("No")