def f(S): X="kadomatsu" if X==S: return True if S in {"adomatsu","kdomatsu","kaomatsu","kadmatsu","kadoatsu","kadomtsu","kadomasu","kadomatu","kadomats"}: assert 0 return True else: return False S=input() print("Yes" if f(S) else "No")