"""

"""

from sys import stdin
import sys

def kd(L):
    if L[0]==L[1] or L[1]==L[2] or L[2]==L[0]:
        return False
    elif max(L) == L[1] or min(L) == L[1]:
        return True
    else:
        return False

S = input()
T = "kadomatsu"
ind = 0

for s in S:
    while ind < len(T) and T[ind] != s:
        ind += 1

    if ind < len(T) and s == T[ind]:
        ind += 1
    else:
        print ("No")
        sys.exit()

print ("Yes")