import sys b =sys.stdin.readline() for i in b: if b.count(i)!=1: print("NO") break elif i ==b[-1]: print("YES")