#include <bits/stdc++.h>
int main() {
  char c[2000], d[1002] = "heidi", e[5000];
  gets(c);
  int j = 0;
  for (int i = 0; i < strlen(c); i++) {
    if (c[i] == d[j]) {
      e[j] = c[i];
      j++;
    }
  }
  if (strcmp(e, d) == 0)
    printf("YES\n");
  else
    printf("NO\n");
}
