import sys
import re
def emo_case(s):
p = re.compile(r'^([A-Z\u0104-\u017B]?([a-z\u0105-\u017C][A-Z\u0104-\u017B])+[a-z\u0105-\u017C]?)')
return "yes" if p.match(s) else "no"
for _, l in enumerate(sys.stdin, start=1):
print(emo_case(l))