S = input() i = 0 K = "kadomatsu" for j in range(9): if K[j] == S[i]: i += 1 continue S += K[j] if len(S) == 9: print("Yes") else: print("No")