#include <bits/stdc++.h>
char a[1001];
int x;
int main() {
  scanf("%s", a);
  for (int i = 0; a[i]; i++)
    if (x == 0)
      x += a[i] == 'h';
    else if (x == 1)
      x += a[i] == 'e';
    else if (x == 2)
      x += a[i] == 'i';
    else if (x == 3)
      x += a[i] == 'd';
    else if (x == 4)
      x += a[i] == 'i';
  puts(x == 5 ? "YES" : "NO");
  return 0;
}
