#include <bits/stdc++.h>
#include <atcoder/all>
using namespace std;
using namespace atcoder;
using ll = long long;
using ld = long double;
using mint = modint998244353;

int main() {
  string S; cin >> S;
  string T = "kadomatsu";
  int i = 0, j = 0;
  while (j < 9) {
    if (S[i] == T[j]) {
      i++; j++;
    } else {
      S.insert(i, 1, T[j]);
      i++; j++;
      if (S.size() > 9) {
        cout << "No" << endl;
        return 0;
      }
    }
  }
  if (S == T) cout << "Yes" << endl;
  else cout << "No" << endl;
  return 0;
}