def main(): from sys import stdin readline = stdin.readline s = readline()[:-1] n = len(s) t = 'kadomatsu' if n > len(t): print('No') exit() arr_t = [x for x in t] delta1 = [] delta2 = [] for i in range(n): if s[i] in arr_t: delta1.append(arr_t.index(s[i])) delta2.append(arr_t.index(s[i])) arr_t.remove(s[i]) if s[i] in arr_t: delta2 = delta2[:-1] delta2.append(arr_t.index(s[i])) else: print('No') exit() error(delta1, delta2) flag = (delta1 == list(sorted(delta1)) or delta2 == list(sorted(delta2))) print('Yes' if flag else 'No') if __name__ == "__main__": import sys readline = sys.stdin.readline def error(*args, end='\n'): print(*args, end=end, file=sys.stderr) main()