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