s = input() kado = "kadomatsu" for bit in range(1, 1 << 9): t = "" for i in range(9): if bit >> i & 1: t += kado[i] if t == s: print('Yes') exit() print('No')