S = str(input()) M = {'k':0,'a':[],'d':0,'o':0,'m':0,'t':0,'s':0,'u':0} J = {'k':1,'a':[2,6],'d':3,'o':4,'m':5,'t':7,'s':8,'u':9} KADOMATSU = "kadomatsu" num = 0 l = ['']*11 ans = "Yes" for s in S: num += 1 if s in KADOMATSU: if s == 'a': len_a = len(M[s]) if len_a < 2: M[s].append(num) l[num] = s else: ans = "No" break else: if M[s] == 0: M[s] = num l[num] = s else: ans = "No" break else: ans = "No" break if ans == "Yes": S = ''.join(l) now = 0 count_a = 0 for s in S: if s == 'a': if J[s][count_a] < now: ans = "No" now = J[s][count_a] count_a += 1 else: if J[s] < now: ans = "No" now = J[s] print(ans) else: print(ans)